[−][src]Struct ruma_identifiers::room_version_id::RoomVersionId
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.
It is discouraged to use this type directly – instead use one of the aliases (RoomVersionId
and RoomVersionIdRef
) in the crate root.
assert_eq!(RoomVersionId::try_from("1").unwrap().as_ref(), "1");
Implementations
impl<T> RoomVersionId<T>
[src]
pub fn version_1() -> Self
[src]
Creates a version 1 room ID.
pub fn version_2() -> Self
[src]
Creates a version 2 room ID.
pub fn version_3() -> Self
[src]
Creates a version 3 room ID.
pub fn version_4() -> Self
[src]
Creates a version 4 room ID.
pub fn version_5() -> Self
[src]
Creates a version 5 room ID.
pub fn version_6() -> Self
[src]
Creates a version 6 room ID.
pub fn is_official(&self) -> bool
[src]
Whether or not this room version is an official one specified by the Matrix protocol.
pub fn is_custom(&self) -> bool
[src]
Whether or not this is a custom room version.
pub fn is_version_1(&self) -> bool
[src]
Whether or not this is a version 1 room.
pub fn is_version_2(&self) -> bool
[src]
Whether or not this is a version 2 room.
pub fn is_version_3(&self) -> bool
[src]
Whether or not this is a version 3 room.
pub fn is_version_4(&self) -> bool
[src]
Whether or not this is a version 4 room.
pub fn is_version_5(&self) -> bool
[src]
Whether or not this is a version 5 room.
pub fn is_version_6(&self) -> bool
[src]
Whether or not this is a version 6 room.
Trait Implementations
impl<T: AsRef<str>> AsRef<str> for RoomVersionId<T>
[src]
impl<T: Clone> Clone for RoomVersionId<T>
[src]
fn clone(&self) -> RoomVersionId<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Copy> Copy for RoomVersionId<T>
[src]
impl<T: Debug> Debug for RoomVersionId<T>
[src]
impl<'de> Deserialize<'de> for RoomVersionId<Box<str>>
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl<T: AsRef<str>> Display for RoomVersionId<T>
[src]
impl<T: Eq> Eq for RoomVersionId<T>
[src]
impl From<RoomVersionId<Box<str>>> for String
[src]
fn from(id: RoomVersionId<Box<str>>) -> Self
[src]
impl<T: Hash> Hash for RoomVersionId<T>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T: Eq + AsRef<str>> Ord for RoomVersionId<T>
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<'_, T: AsRef<str>> PartialEq<&'_ str> for RoomVersionId<T>
[src]
impl<T: PartialEq> PartialEq<RoomVersionId<T>> for RoomVersionId<T>
[src]
fn eq(&self, other: &RoomVersionId<T>) -> bool
[src]
fn ne(&self, other: &RoomVersionId<T>) -> bool
[src]
impl<'_, T: AsRef<str>> PartialEq<RoomVersionId<T>> for &'_ str
[src]
fn eq(&self, other: &RoomVersionId<T>) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<T: AsRef<str>> PartialEq<RoomVersionId<T>> for String
[src]
fn eq(&self, other: &RoomVersionId<T>) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<T: AsRef<str>> PartialEq<String> for RoomVersionId<T>
[src]
impl<T: PartialEq + AsRef<str>> PartialOrd<RoomVersionId<T>> for RoomVersionId<T>
[src]
fn partial_cmp(&self, other: &RoomVersionId<T>) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<T: AsRef<str>> Serialize for RoomVersionId<T>
[src]
impl<T> StructuralEq for RoomVersionId<T>
[src]
impl<T> StructuralPartialEq for RoomVersionId<T>
[src]
impl<'_> TryFrom<&'_ str> for RoomVersionId<Box<str>>
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: &str) -> Result<Self, Error>
[src]
impl<'a> TryFrom<&'a str> for RoomVersionId<&'a str>
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: &'a str) -> Result<Self, Error>
[src]
impl TryFrom<String> for RoomVersionId<Box<str>>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for RoomVersionId<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for RoomVersionId<T> where
T: Send,
T: Send,
impl<T> Sync for RoomVersionId<T> where
T: Sync,
T: Sync,
impl<T> Unpin for RoomVersionId<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for RoomVersionId<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,