#[non_exhaustive]pub enum MatrixId {
Room(OwnedRoomId),
RoomAlias(OwnedRoomAliasId),
User(OwnedUserId),
Event(OwnedRoomOrAliasId, OwnedEventId),
}
Expand description
All Matrix Identifiers that can be represented as a Matrix URI.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Room(OwnedRoomId)
A room ID.
RoomAlias(OwnedRoomAliasId)
A room alias.
User(OwnedUserId)
A user ID.
Event(OwnedRoomOrAliasId, OwnedEventId)
An event ID.
Constructing this variant from an OwnedRoomAliasId
is deprecated, because room aliases
are mutable, so the URI might break after a while.
Trait Implementations§
Source§impl From<&RoomAliasId> for MatrixId
impl From<&RoomAliasId> for MatrixId
Source§fn from(room_alias: &RoomAliasId) -> MatrixId
fn from(room_alias: &RoomAliasId) -> MatrixId
Converts to this type from the input type.
Source§impl From<(OwnedRoomAliasId, OwnedEventId)> for MatrixId
impl From<(OwnedRoomAliasId, OwnedEventId)> for MatrixId
Source§fn from(ids: (OwnedRoomAliasId, OwnedEventId)) -> MatrixId
fn from(ids: (OwnedRoomAliasId, OwnedEventId)) -> MatrixId
Converts to this type from the input type.
Source§impl From<(OwnedRoomId, OwnedEventId)> for MatrixId
impl From<(OwnedRoomId, OwnedEventId)> for MatrixId
Source§fn from(ids: (OwnedRoomId, OwnedEventId)) -> MatrixId
fn from(ids: (OwnedRoomId, OwnedEventId)) -> MatrixId
Converts to this type from the input type.
Source§impl From<(OwnedRoomOrAliasId, OwnedEventId)> for MatrixId
impl From<(OwnedRoomOrAliasId, OwnedEventId)> for MatrixId
Source§fn from(ids: (OwnedRoomOrAliasId, OwnedEventId)) -> MatrixId
fn from(ids: (OwnedRoomOrAliasId, OwnedEventId)) -> MatrixId
Converts to this type from the input type.
Source§impl From<OwnedRoomAliasId> for MatrixId
impl From<OwnedRoomAliasId> for MatrixId
Source§fn from(room_alias: OwnedRoomAliasId) -> MatrixId
fn from(room_alias: OwnedRoomAliasId) -> MatrixId
Converts to this type from the input type.
Source§impl From<OwnedRoomId> for MatrixId
impl From<OwnedRoomId> for MatrixId
Source§fn from(room_id: OwnedRoomId) -> MatrixId
fn from(room_id: OwnedRoomId) -> MatrixId
Converts to this type from the input type.
Source§impl From<OwnedUserId> for MatrixId
impl From<OwnedUserId> for MatrixId
Source§fn from(user_id: OwnedUserId) -> MatrixId
fn from(user_id: OwnedUserId) -> MatrixId
Converts to this type from the input type.
impl Eq for MatrixId
impl StructuralPartialEq for MatrixId
Auto Trait Implementations§
impl Freeze for MatrixId
impl RefUnwindSafe for MatrixId
impl Send for MatrixId
impl Sync for MatrixId
impl Unpin for MatrixId
impl UnwindSafe for MatrixId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.