Struct ruma_identifiers::RoomAliasId[][src]

pub struct RoomAliasId { /* 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"
);

Implementations

impl RoomAliasId[src]

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

Returns the room’s alias.

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

Returns the server name of the room alias ID.

impl RoomAliasId[src]

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

Creates a string slice from this RoomAliasId

pub fn as_bytes(&self) -> &[u8][src]

Creates a byte slice from this RoomAliasId

Trait Implementations

impl AsRef<str> for RoomAliasId[src]

impl Clone for RoomAliasId[src]

impl Debug for RoomAliasId[src]

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

impl Display for RoomAliasId[src]

impl Eq for RoomAliasId[src]

impl From<RoomAliasId> for RoomIdOrAliasId[src]

impl FromStr for RoomAliasId[src]

type Err = Error

The associated error which can be returned from parsing.

impl Hash for RoomAliasId[src]

impl Ord for RoomAliasId[src]

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

impl PartialEq<RoomAliasId> for RoomAliasId[src]

impl PartialEq<String> for RoomAliasId[src]

impl PartialEq<str> for RoomAliasId[src]

impl PartialOrd<RoomAliasId> for RoomAliasId[src]

impl Serialize for RoomAliasId[src]

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

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<RoomIdOrAliasId> for RoomAliasId[src]

type Error = RoomId

The type returned in the event of a conversion error.

impl TryFrom<String> for RoomAliasId[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

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>,