Struct matrix_sdk_crypto::RoomIdentityState
source · 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