#[non_exhaustive]pub enum RoomVersionId {
V1,
V2,
V3,
V4,
V5,
V6,
V7,
V8,
V9,
V10,
V11,
}Expand description
A Matrix room version ID.
A RoomVersionId can be or converted or deserialized from a string slice, and can be converted
or serialized back into a string as needed.
assert_eq!(RoomVersionId::try_from("1").unwrap().as_str(), "1");Any string consisting of at minimum 1, at maximum 32 unicode codepoints is a room version ID.
Custom room versions or ones that were introduced into the specification after this code was
written are represented by a hidden enum variant. You can still construct them the same, and
check for them using one of RoomVersionIds PartialEq implementations or through .as_str().
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
V1
A version 1 room.
V2
A version 2 room.
V3
A version 3 room.
V4
A version 4 room.
V5
A version 5 room.
V6
A version 6 room.
V7
A version 7 room.
V8
A version 8 room.
V9
A version 9 room.
V10
A version 10 room.
V11
A version 11 room.
Implementations§
Trait Implementations§
Source§impl AsRef<[u8]> for RoomVersionId
impl AsRef<[u8]> for RoomVersionId
Source§impl AsRef<str> for RoomVersionId
impl AsRef<str> for RoomVersionId
Source§impl Clone for RoomVersionId
impl Clone for RoomVersionId
Source§fn clone(&self) -> RoomVersionId
fn clone(&self) -> RoomVersionId
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RoomVersionId
impl Debug for RoomVersionId
Source§impl<'de> Deserialize<'de> for RoomVersionId
impl<'de> Deserialize<'de> for RoomVersionId
Source§fn deserialize<D>(
deserializer: D,
) -> Result<RoomVersionId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<RoomVersionId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl Display for RoomVersionId
impl Display for RoomVersionId
Source§impl From<RoomVersionId> for String
impl From<RoomVersionId> for String
Source§fn from(id: RoomVersionId) -> String
fn from(id: RoomVersionId) -> String
Source§impl FromStr for RoomVersionId
impl FromStr for RoomVersionId
Source§impl Hash for RoomVersionId
impl Hash for RoomVersionId
Source§impl Ord for RoomVersionId
impl Ord for RoomVersionId
Source§fn cmp(&self, other: &RoomVersionId) -> Ordering
fn cmp(&self, other: &RoomVersionId) -> Ordering
Compare the two given room version IDs by comparing their string representations.
Please be aware that room version IDs don’t have a defined ordering in the Matrix
specification. This implementation only exists to be able to use RoomVersionIds or
types containing RoomVersionIds as BTreeMap keys.
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq<&str> for RoomVersionId
impl PartialEq<&str> for RoomVersionId
Source§impl PartialEq<RoomVersionId> for &str
impl PartialEq<RoomVersionId> for &str
Source§impl PartialEq<RoomVersionId> for String
impl PartialEq<RoomVersionId> for String
Source§impl PartialEq<String> for RoomVersionId
impl PartialEq<String> for RoomVersionId
Source§impl PartialEq for RoomVersionId
impl PartialEq for RoomVersionId
Source§impl PartialOrd for RoomVersionId
impl PartialOrd for RoomVersionId
Source§fn partial_cmp(&self, other: &RoomVersionId) -> Option<Ordering>
fn partial_cmp(&self, other: &RoomVersionId) -> Option<Ordering>
Compare the two given room version IDs by comparing their string representations.
Please be aware that room version IDs don’t have a defined ordering in the Matrix
specification. This implementation only exists to be able to use RoomVersionIds or
types containing RoomVersionIds as BTreeMap keys.
Source§impl Serialize for RoomVersionId
impl Serialize for RoomVersionId
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Source§impl TryFrom<&str> for RoomVersionId
impl TryFrom<&str> for RoomVersionId
Source§impl TryFrom<String> for RoomVersionId
impl TryFrom<String> for RoomVersionId
impl Eq for RoomVersionId
impl StructuralPartialEq for RoomVersionId
Auto Trait Implementations§
impl Freeze for RoomVersionId
impl RefUnwindSafe for RoomVersionId
impl Send for RoomVersionId
impl Sync for RoomVersionId
impl Unpin for RoomVersionId
impl UnwindSafe for RoomVersionId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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
key and return true if they are equal.Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
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>
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>
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