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().to_string(),
    "#ruma:example.com"
);

Methods

impl RoomAliasId
[src]

Returns a Host for the room alias ID, containing the server name (minus the port) of the originating homeserver.

The host can be either a domain name, an IPv4 address, or an IPv6 address.

Returns the room's alias.

Returns the port the originating homeserver can be accessed on.

Trait Implementations

impl Clone for RoomAliasId
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for RoomAliasId
[src]

Formats the value using the given formatter.

impl Eq for RoomAliasId
[src]

impl Hash for RoomAliasId
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl PartialEq for RoomAliasId
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Display for RoomAliasId
[src]

Formats the value using the given formatter. Read more

impl Serialize for RoomAliasId
[src]

Serialize this value into the given Serde serializer. Read more

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

Deserialize this value from the given Serde deserializer. Read more

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Attempts to create a new Matrix room alias ID from a string representation.

The string must include the leading # sigil, the alias, a literal colon, and a valid server name.