pub enum User {
Alice,
Bob,
Carol,
}Expand description
A Matrix user.
This can be converted to the following types with .into():
&'static UserIdOwnedUserId&'static DirectUserIdentifierOwnedDirectUserIdentifier
It implements PartialEq with all the ID types above, as well as with
serde_json::Value to use with the assert_eq! macro.
It implements Serialize and Into<String> to use it with the json!
macro.
It implements Hash and Equivalent<OwnedUserId> as well to be able to use
it with methods like IndexMap::get() or IndexMap::contains_key().
It can also be converted to a borrowed string with .as_str() to use it
with methods like HashMap::get() or HashSet::contains().
Variants§
Implementations§
Trait Implementations§
impl Copy for User
Source§impl Equivalent<OwnedUserId> for User
impl Equivalent<OwnedUserId> for User
Source§fn equivalent(&self, key: &OwnedUserId) -> bool
fn equivalent(&self, key: &OwnedUserId) -> bool
Compare self to
key and return true if they are equal.Auto Trait Implementations§
impl Freeze for User
impl RefUnwindSafe for User
impl Send for User
impl Sync for User
impl Unpin for User
impl UnsafeUnpin for User
impl UnwindSafe for User
Blanket Implementations§
impl<T> AsyncTraitDeps for T
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> ErasedDestructor for Twhere
T: 'static,
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<I> IntoResettable<String> for I
impl<I> IntoResettable<String> for I
Source§fn into_resettable(self) -> Resettable<String>
fn into_resettable(self) -> Resettable<String>
Convert to the intended resettable type