pub struct RoomIdentityState<R: RoomIdentityProvider> { /* private fields */ }
Expand description
The state of the identities in a given room - whether they are:
- in pin violation (the identity changed after we accepted their identity),
- verified (we manually did the emoji dance),
- previously verified (we did the emoji dance and then their identity changed),
- otherwise, they are pinned.
Implementations§
Source§impl<R: RoomIdentityProvider> RoomIdentityState<R>
impl<R: RoomIdentityProvider> RoomIdentityState<R>
Sourcepub async fn new(room: R) -> Self
pub async fn new(room: R) -> Self
Create a new RoomIdentityState using the provided room to check whether users are members.
Sourcepub fn current_state(&self) -> Vec<IdentityStatusChange>
pub fn current_state(&self) -> Vec<IdentityStatusChange>
Provide the current state of the room: a list of all the non-pinned identities and their status.
Sourcepub async fn process_change(
&mut self,
item: RoomIdentityChange,
) -> Vec<IdentityStatusChange>
pub async fn process_change( &mut self, item: RoomIdentityChange, ) -> Vec<IdentityStatusChange>
Deal with an incoming event - either someone’s identity changed, or some changes happened to a room’s membership.
Returns the changes (if any) to the list of valid/invalid identities in the room.
Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for RoomIdentityState<R>where
R: Freeze,
impl<R> RefUnwindSafe for RoomIdentityState<R>where
R: RefUnwindSafe,
impl<R> Send for RoomIdentityState<R>where
R: Send,
impl<R> Sync for RoomIdentityState<R>where
R: Sync,
impl<R> Unpin for RoomIdentityState<R>where
R: Unpin,
impl<R> UnwindSafe for RoomIdentityState<R>where
R: UnwindSafe,
Blanket Implementations§
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, 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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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