[−][src]Struct ruma_identifiers::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.
assert_eq!(RoomVersionId::try_from("1").unwrap().as_ref(), "1");
Methods
impl RoomVersionId
[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 custom(id: String) -> Self
[src]
Creates a custom room version ID from the given string slice.
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.
Trait Implementations
impl<'expr> AsExpression<Nullable<Text>> for &'expr RoomVersionId
[src]
type Expression = Bound<Nullable<Text>, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
impl AsExpression<Nullable<Text>> for RoomVersionId
[src]
type Expression = Bound<Nullable<Text>, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
impl<'expr> AsExpression<Text> for &'expr RoomVersionId
[src]
type Expression = Bound<Text, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
impl AsExpression<Text> for RoomVersionId
[src]
type Expression = Bound<Text, Self>
The expression being returned
fn as_expression(self) -> Self::Expression
[src]
impl AsRef<str> for RoomVersionId
[src]
impl Clone for RoomVersionId
[src]
fn clone(&self) -> RoomVersionId
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for RoomVersionId
[src]
impl<'de> Deserialize<'de> for RoomVersionId
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Display for RoomVersionId
[src]
impl Eq for RoomVersionId
[src]
impl From<RoomVersionId> for String
[src]
fn from(id: RoomVersionId) -> Self
[src]
impl<DB> FromSql<Text, DB> for RoomVersionId where
String: FromSql<Text, DB>,
DB: Backend,
[src]
String: FromSql<Text, DB>,
DB: Backend,
impl<__ST, __DB> FromSqlRow<__ST, __DB> for RoomVersionId where
__DB: Backend,
Self: FromSql<__ST, __DB>,
[src]
__DB: Backend,
Self: FromSql<__ST, __DB>,
fn build_from_row<R: Row<__DB>>(row: &mut R) -> Result<Self>
[src]
const FIELDS_NEEDED: usize
impl Hash for RoomVersionId
[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 NotNull for RoomVersionId
[src]
impl PartialEq<RoomVersionId> for RoomVersionId
[src]
fn eq(&self, other: &RoomVersionId) -> bool
[src]
fn ne(&self, other: &RoomVersionId) -> bool
[src]
impl PartialEq<RoomVersionId> for str
[src]
fn eq(&self, other: &RoomVersionId) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialEq<RoomVersionId> for String
[src]
fn eq(&self, other: &RoomVersionId) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialEq<String> for RoomVersionId
[src]
impl PartialEq<str> for RoomVersionId
[src]
impl QueryId for RoomVersionId
[src]
type QueryId = RoomVersionId
A type which uniquely represents Self
in a SQL query. Read more
const HAS_STATIC_QUERY_ID: bool
[src]
fn query_id() -> Option<TypeId>
impl<__ST, __DB> Queryable<__ST, __DB> for RoomVersionId where
__DB: Backend,
Self: FromSql<__ST, __DB>,
[src]
__DB: Backend,
Self: FromSql<__ST, __DB>,
type Row = Self
The Rust type you'd like to map from. Read more
fn build(row: Self::Row) -> Self
[src]
impl Serialize for RoomVersionId
[src]
impl SingleValue for RoomVersionId
[src]
impl StructuralEq for RoomVersionId
[src]
impl StructuralPartialEq for RoomVersionId
[src]
impl<__DB> ToSql<Nullable<Text>, __DB> for RoomVersionId where
__DB: Backend,
Self: ToSql<Text, __DB>,
[src]
__DB: Backend,
Self: ToSql<Text, __DB>,
impl<DB> ToSql<Text, DB> for RoomVersionId where
DB: Backend,
[src]
DB: Backend,
impl<'_> TryFrom<&'_ str> for RoomVersionId
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(s: &str) -> Result<Self, Self::Error>
[src]
impl<'_> TryFrom<Cow<'_, str>> for RoomVersionId
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(room_version_id: Cow<str>) -> Result<Self, Error>
[src]
Attempts to create a new Matrix room version ID from a string representation.
impl TryFrom<String> 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> 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> IntoNullable for T where
T: NotNull,
T: NotNull,
impl<T> IntoSql for T
fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
&'a Self: AsExpression<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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,