#[repr(transparent)]pub struct MxcUri(_);Expand description
A URI that should be a Matrix-spec compliant MXC URI.
Implementations
sourceimpl MxcUri
 
impl MxcUri
sourcepub fn media_id(&self) -> Result<&str, MxcUriError>
 
pub fn media_id(&self) -> Result<&str, MxcUriError>
If this is a valid MXC URI, returns the media ID.
sourcepub fn server_name(&self) -> Result<&ServerName, MxcUriError>
 
pub fn server_name(&self) -> Result<&ServerName, MxcUriError>
If this is a valid MXC URI, returns the server name.
sourcepub fn parts(&self) -> Result<(&ServerName, &str), MxcUriError>
 
pub fn parts(&self) -> Result<(&ServerName, &str), MxcUriError>
If this is a valid MXC URI, returns a (server_name, media_id) tuple, else it returns the
error.
sourcepub fn validate(&self) -> Result<(), MxcUriError>
 
pub fn validate(&self) -> Result<(), MxcUriError>
Validates the URI and returns an error if it failed.
Trait Implementations
sourceimpl AsRef<MxcUri> for OwnedMxcUri
 
impl AsRef<MxcUri> for OwnedMxcUri
sourceimpl Borrow<MxcUri> for OwnedMxcUri
 
impl Borrow<MxcUri> for OwnedMxcUri
sourceimpl<'de> Deserialize<'de> for Box<MxcUri, Global>
 
impl<'de> Deserialize<'de> for Box<MxcUri, Global>
sourcefn deserialize<D>(
    deserializer: D
) -> Result<Box<MxcUri, Global>, <D as Deserializer<'de>>::Error> where
    D: Deserializer<'de>, 
 
fn deserialize<D>(
    deserializer: D
) -> Result<Box<MxcUri, Global>, <D as Deserializer<'de>>::Error> where
    D: Deserializer<'de>, 
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<'_> From<&MxcUri> for OwnedMxcUri
 
impl<'_> From<&MxcUri> for OwnedMxcUri
sourcefn from(id: &MxcUri) -> OwnedMxcUri
 
fn from(id: &MxcUri) -> OwnedMxcUri
Converts to this type from the input type.
sourceimpl Ord for MxcUri
 
impl Ord for MxcUri
sourceimpl<'_> PartialEq<&MxcUri> for OwnedMxcUri
 
impl<'_> PartialEq<&MxcUri> for OwnedMxcUri
sourceimpl PartialEq<MxcUri> for OwnedMxcUri
 
impl PartialEq<MxcUri> for OwnedMxcUri
sourceimpl<'_> PartialEq<OwnedMxcUri> for &MxcUri
 
impl<'_> PartialEq<OwnedMxcUri> for &MxcUri
sourceimpl PartialEq<OwnedMxcUri> for MxcUri
 
impl PartialEq<OwnedMxcUri> for MxcUri
sourceimpl PartialOrd<MxcUri> for MxcUri
 
impl PartialOrd<MxcUri> for MxcUri
sourcefn partial_cmp(&self, other: &MxcUri) -> Option<Ordering>
 
fn partial_cmp(&self, other: &MxcUri) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
 
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
 
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
sourceimpl Serialize for MxcUri
 
impl Serialize for MxcUri
sourcefn serialize<S>(
    &self, 
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer, 
 
fn serialize<S>(
    &self, 
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer, 
Serialize this value into the given Serde serializer. Read more
sourceimpl ToOwned for MxcUri
 
impl ToOwned for MxcUri
type Owned = OwnedMxcUri
type Owned = OwnedMxcUri
The resulting type after obtaining ownership.
sourcefn to_owned(&self) -> <MxcUri as ToOwned>::Owned
 
fn to_owned(&self) -> <MxcUri as ToOwned>::Owned
Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · sourcefn clone_into(&self, target: &mut Self::Owned)
 
fn clone_into(&self, target: &mut Self::Owned)
Uses borrowed data to replace owned data, usually by cloning. Read more
impl Eq for MxcUri
impl StructuralEq for MxcUri
impl StructuralPartialEq for MxcUri
Auto Trait Implementations
impl RefUnwindSafe for MxcUri
impl Send for MxcUri
impl !Sized for MxcUri
impl Sync for MxcUri
impl Unpin for MxcUri
impl UnwindSafe for MxcUri
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
    T: ?Sized, 
 
impl<T> BorrowMut<T> for T where
    T: ?Sized, 
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CallHasher for T where
    T: Hash + ?Sized, 
 
impl<T> CallHasher for T where
    T: Hash + ?Sized, 
sourceimpl<Q, K> Equivalent<K> for Q where
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized, 
 
impl<Q, K> Equivalent<K> for Q where
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized, 
sourcefn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.
