Enum ruma::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.
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.
source§impl PartialEq for MatrixId
impl PartialEq for MatrixId
impl Eq for MatrixId
impl StructuralEq for MatrixId
impl StructuralPartialEq for MatrixId
Auto Trait Implementations§
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.