[][src]Struct ruma_identifiers::room_alias_id::RoomAliasId

pub struct RoomAliasId<T> { /* fields omitted */ }

A Matrix room alias ID.

A RoomAliasId is converted from a string slice, and can be converted back into a string as needed.

assert_eq!(
    RoomAliasId::try_from("#ruma:example.com").unwrap().as_ref(),
    "#ruma:example.com"
);

Methods

impl<T: AsRef<str>> RoomAliasId<T>[src]

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

Returns the room's alias.

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

Returns the server name of the room alias ID.

Trait Implementations

impl<T: AsRef<str>> AsRef<str> for RoomAliasId<T>[src]

impl<T: Clone> Clone for RoomAliasId<T>[src]

impl<T: Debug> Debug for RoomAliasId<T>[src]

impl<'de> Deserialize<'de> for RoomAliasId<Box<str>>[src]

impl<T: Display> Display for RoomAliasId<T>[src]

impl<T: Eq> Eq for RoomAliasId<T>[src]

impl From<RoomAliasId<Box<str>>> for String[src]

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

impl<T: Hash> Hash for RoomAliasId<T>[src]

impl<T: Ord> Ord for RoomAliasId<T>[src]

impl<'_, T: AsRef<str>> PartialEq<&'_ str> for RoomAliasId<T>[src]

impl<T: PartialEq> PartialEq<RoomAliasId<T>> for RoomAliasId<T>[src]

impl<'_, T: AsRef<str>> PartialEq<RoomAliasId<T>> for &'_ str[src]

impl<T: AsRef<str>> PartialEq<RoomAliasId<T>> for String[src]

impl<T: AsRef<str>> PartialEq<String> for RoomAliasId<T>[src]

impl<T: PartialOrd> PartialOrd<RoomAliasId<T>> for RoomAliasId<T>[src]

impl<T: AsRef<str>> Serialize for RoomAliasId<T>[src]

impl<'_> TryFrom<&'_ str> for RoomAliasId<Box<str>>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a str> for RoomAliasId<&'a str>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<T: AsRef<str>> TryFrom<RoomIdOrAliasId<T>> for RoomAliasId<T>[src]

type Error = RoomId<T>

The type returned in the event of a conversion error.

impl TryFrom<String> for RoomAliasId<Box<str>>[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl<T> RefUnwindSafe for RoomAliasId<T> where
    T: RefUnwindSafe

impl<T> Send for RoomAliasId<T> where
    T: Send

impl<T> Sync for RoomAliasId<T> where
    T: Sync

impl<T> Unpin for RoomAliasId<T> where
    T: Unpin

impl<T> UnwindSafe for RoomAliasId<T> where
    T: UnwindSafe

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: 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.