Struct ruma_identifiers::MxcUri[][src]

pub struct MxcUri { /* fields omitted */ }

A URI that should be a Matrix-spec compliant MXC URI.

Implementations

impl MxcUri[src]

pub fn media_id(&self) -> Option<&str>[src]

If this is a valid MXC URI, returns the media ID.

pub fn server_name(&self) -> Option<&ServerName>[src]

If this is a valid MXC URI, returns the server name.

pub fn parts(&self) -> Option<(&ServerName, &str)>[src]

If this is a valid MXC URI, returns a (server_name, media_id) tuple.

pub fn is_valid(&self) -> bool[src]

Returns if this is a spec-compliant MXC URI.

pub fn as_str(&self) -> &str[src]

Create a string slice from this MXC URI.

Trait Implementations

impl Clone for MxcUri[src]

impl Debug for MxcUri[src]

impl<'de> Deserialize<'de> for MxcUri[src]

impl Display for MxcUri[src]

impl Eq for MxcUri[src]

impl From<&'_ str> for MxcUri[src]

impl From<String> for MxcUri[src]

impl Hash for MxcUri[src]

impl Ord for MxcUri[src]

impl PartialEq<MxcUri> for MxcUri[src]

impl PartialOrd<MxcUri> for MxcUri[src]

impl Serialize for MxcUri[src]

impl StructuralEq for MxcUri[src]

impl StructuralPartialEq for MxcUri[src]

Auto Trait Implementations

impl RefUnwindSafe for MxcUri

impl Send for MxcUri

impl Sync for MxcUri

impl Unpin for MxcUri

impl UnwindSafe for MxcUri

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,