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.
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§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.source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more