Struct ruma_identifiers::MxcUri [−][src]
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]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>, [src]
D: Deserializer<'de>,
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]
fn hash<__H: Hasher>(&self, state: &mut __H)[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl Ord for MxcUri[src]
fn cmp(&self, other: &MxcUri) -> Ordering[src]
#[must_use]pub fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self1.50.0[src]
impl PartialEq<MxcUri> for MxcUri[src]
impl PartialOrd<MxcUri> for MxcUri[src]
fn partial_cmp(&self, other: &MxcUri) -> Option<Ordering>[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool1.0.0[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,