Enum ruma_identifiers::RoomVersionId [−][src]
pub enum RoomVersionId { Version1, Version2, Version3, Version4, Version5, Version6, // some variants omitted }
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_ref(), "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 RoomVersionId
s PartialEq
implementations or through .as_str()
.
Variants
Expand description
A version 1 room.
Expand description
A version 2 room.
Expand description
A version 3 room.
Expand description
A version 4 room.
Expand description
A version 5 room.
Expand description
A version 6 room.
Implementations
impl RoomVersionId
[src]
impl RoomVersionId
[src]Trait Implementations
impl Clone for RoomVersionId
[src]
impl Clone for RoomVersionId
[src]fn clone(&self) -> RoomVersionId
[src]
fn clone(&self) -> RoomVersionId
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for RoomVersionId
[src]
impl Debug for RoomVersionId
[src]impl<'de> Deserialize<'de> for RoomVersionId
[src]
impl<'de> Deserialize<'de> for RoomVersionId
[src]fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl Display for RoomVersionId
[src]
impl Display for RoomVersionId
[src]impl FromStr for RoomVersionId
[src]
impl FromStr for RoomVersionId
[src]impl Hash for RoomVersionId
[src]
impl Hash for RoomVersionId
[src]impl Ord for RoomVersionId
[src]
impl Ord for RoomVersionId
[src]fn cmp(&self, other: &Self) -> Ordering
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]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 RoomVersionId
s or
types containing RoomVersionId
s as BTreeMap
keys.
impl PartialEq<&'_ str> for RoomVersionId
[src]
impl PartialEq<&'_ str> for RoomVersionId
[src]impl PartialEq<RoomVersionId> for RoomVersionId
[src]
impl PartialEq<RoomVersionId> for RoomVersionId
[src]fn eq(&self, other: &RoomVersionId) -> bool
[src]
fn eq(&self, other: &RoomVersionId) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &RoomVersionId) -> bool
[src]
fn ne(&self, other: &RoomVersionId) -> bool
[src]This method tests for !=
.
impl PartialEq<String> for RoomVersionId
[src]
impl PartialEq<String> for RoomVersionId
[src]impl PartialOrd<RoomVersionId> for RoomVersionId
[src]
impl PartialOrd<RoomVersionId> for RoomVersionId
[src]fn partial_cmp(&self, other: &RoomVersionId) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &RoomVersionId) -> Option<Ordering>
[src]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 RoomVersionId
s or
types containing RoomVersionId
s as BTreeMap
keys.
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Serialize for RoomVersionId
[src]
impl Serialize for RoomVersionId
[src]impl TryFrom<&'_ str> for RoomVersionId
[src]
impl TryFrom<&'_ str> for RoomVersionId
[src]impl TryFrom<String> for RoomVersionId
[src]
impl TryFrom<String> for RoomVersionId
[src]impl Eq for RoomVersionId
[src]
impl StructuralEq for RoomVersionId
[src]
impl StructuralPartialEq for RoomVersionId
[src]
Auto Trait Implementations
impl RefUnwindSafe for RoomVersionId
impl Send for RoomVersionId
impl Sync for RoomVersionId
impl Unpin for RoomVersionId
impl UnwindSafe for RoomVersionId
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,