Enum fractal::session::model::room::room_type::RoomType

source ·
#[repr(u32)]
pub enum RoomType { Invited = 0, Favorite = 1, Normal = 2, LowPriority = 3, Left = 4, Outdated = 5, Space = 6, Ignored = 7, }

Variants§

§

Invited = 0

The user was invited to the room.

§

Favorite = 1

The room is joined and has the m.favourite tag.

§

Normal = 2

The room is joined and has no known tag.

§

LowPriority = 3

The room is joined and has the m.lowpriority tag.

§

Left = 4

The room was left by the user, or they were kicked or banned.

§

Outdated = 5

The room was upgraded and their successor was joined.

§

Space = 6

The room is a space.

§

Ignored = 7

The room should be ignored.

According to the Matrix specification, invites from ignored users should be ignored.

Implementations§

source§

impl RoomType

source

fn register_enum() -> Type

Registers the enum only once.

source§

impl RoomType

source

pub fn can_change_to(&self, category: RoomType) -> bool

Check whether this RoomType can be changed to category.

source

pub fn is_state(&self, state: RoomState) -> bool

Whether this RoomType corresponds to the given state.

Trait Implementations§

source§

impl Clone for RoomType

source§

fn clone(&self) -> RoomType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RoomType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for RoomType

source§

fn default() -> RoomType

Returns the “default value” for a type. Read more
source§

impl Display for RoomType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<&RoomType> for CategoryType

source§

fn from(room_type: &RoomType) -> Self

Converts to this type from the input type.
source§

impl From<RoomType> for CategoryType

source§

fn from(room_type: RoomType) -> Self

Converts to this type from the input type.
source§

impl From<RoomType> for Value

source§

fn from(v: RoomType) -> Self

Converts to this type from the input type.
source§

impl FromGlib<i32> for RoomType

source§

unsafe fn from_glib(value: i32) -> Self

source§

impl<'a> FromValue<'a> for RoomType

§

type Checker = GenericValueTypeChecker<RoomType>

Value type checker.
source§

unsafe fn from_value(value: &'a Value) -> Self

Get the contained value from a Value. Read more
source§

impl HasParamSpec for RoomType

§

type ParamSpec = ParamSpecEnum

§

type SetValue = RoomType

Preferred value to be used as setter for the associated ParamSpec.
§

type BuilderFn = fn(_: &str, _: RoomType) -> ParamSpecEnumBuilder<'_, RoomType>

source§

fn param_spec_builder() -> Self::BuilderFn

source§

impl Hash for RoomType

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl IntoGlib for RoomType

source§

impl PartialEq for RoomType

source§

fn eq(&self, other: &RoomType) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StaticType for RoomType

source§

fn static_type() -> Type

Returns the type identifier of Self.
source§

impl ToValue for RoomType

source§

fn to_value(&self) -> Value

Convert a value to a Value.
source§

fn value_type(&self) -> Type

Returns the type identifier of self. Read more
source§

impl TryFrom<&CategoryType> for RoomType

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(category_type: &CategoryType) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<CategoryType> for RoomType

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_from(category_type: CategoryType) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFromGlib<i32> for RoomType

§

type Error = i32

source§

unsafe fn try_from_glib(value: i32) -> Result<Self, i32>

source§

impl ValueType for RoomType

§

type Type = RoomType

Type to get the Type from. Read more
source§

impl Copy for RoomType

source§

impl Eq for RoomType

source§

impl StructuralPartialEq for RoomType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FromRef<T> for T
where T: Clone,

source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
source§

impl<T, W> HasTypeWitness<W> for T
where W: MakeTypeWitness<Arg = T>, T: ?Sized,

source§

const WITNESS: W = W::MAKE

A constant of the type witness
source§

impl<T> Identity for T
where T: ?Sized,

§

type Type = T

The same type as Self, used to emulate type equality bounds (T == U) with associated type equality constraints (T: Identity<Type = U>).
source§

const TYPE_EQ: TypeEq<T, <T as Identity>::Type> = TypeEq::NEW

Proof that Self is the same type as Self::Type, provides methods for casting between Self and Self::Type.
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoClosureReturnValue for T
where T: Into<Value>,

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<T> NoneValue for T
where T: Default,

§

type NoneType = T

source§

fn null_value() -> T

The none-equivalent value.
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Property for T
where T: HasParamSpec,

§

type Value = T

source§

impl<T> PropertyGet for T
where T: HasParamSpec,

§

type Value = T

source§

fn get<R, F>(&self, f: F) -> R
where F: Fn(&<T as PropertyGet>::Value) -> R,

source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> StaticTypeExt for T
where T: StaticType,

source§

fn ensure_type()

Ensures that the type has been registered with the type system.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToSendValue for T
where T: Send + ToValue + ?Sized,

source§

fn to_send_value(&self) -> SendValue

Returns a SendValue clone of self.
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T> TryFromClosureReturnValue for T
where T: for<'a> FromValue<'a> + StaticType + 'static,

source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> Any for T
where T: Any,

source§

impl<T> AsyncTraitDeps for T

source§

impl<T> CloneAny for T
where T: Any + Clone,

source§

impl<T> CloneAnySend for T
where T: Any + Send + Clone,

source§

impl<T> CloneAnySendSync for T
where T: Any + Send + Sync + Clone,

source§

impl<T> CloneAnySync for T
where T: Any + Sync + Clone,

source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

source§

impl<T> SendOutsideWasm for T
where T: Send,

source§

impl<T> SyncOutsideWasm for T
where T: Sync,