Enum ruma_common::matrix_uri::MatrixId
source · #[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) -> Self
fn from(room_alias: &RoomAliasId) -> Self
Converts to this type from the input type.
source§impl From<(&RoomAliasId, &EventId)> for MatrixId
impl From<(&RoomAliasId, &EventId)> for MatrixId
source§fn from(ids: (&RoomAliasId, &EventId)) -> Self
fn from(ids: (&RoomAliasId, &EventId)) -> Self
Converts to this type from the input type.
source§impl From<(&RoomOrAliasId, &EventId)> for MatrixId
impl From<(&RoomOrAliasId, &EventId)> for MatrixId
source§fn from(ids: (&RoomOrAliasId, &EventId)) -> Self
fn from(ids: (&RoomOrAliasId, &EventId)) -> Self
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)) -> Self
fn from(ids: (OwnedRoomAliasId, OwnedEventId)) -> Self
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)) -> Self
fn from(ids: (OwnedRoomId, OwnedEventId)) -> Self
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)) -> Self
fn from(ids: (OwnedRoomOrAliasId, OwnedEventId)) -> Self
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) -> Self
fn from(room_alias: OwnedRoomAliasId) -> Self
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) -> Self
fn from(room_id: OwnedRoomId) -> Self
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) -> Self
fn from(user_id: OwnedUserId) -> Self
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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.