pub struct IdentityStatusChanges { /* private fields */ }
e2e-encryption
and non-WebAssembly only.Expand description
Support for creating a stream of batches of IdentityStatusChange
.
Internally, this subscribes to all identity changes, and to room events that change the membership, and provides a stream of all changes to the identity status of all room members.
This struct does not represent the actual stream, but the state that is used to produce the values of the stream.
It does provide a method to create the stream:
IdentityStatusChanges::create_stream
.
Implementations§
Source§impl IdentityStatusChanges
impl IdentityStatusChanges
Sourcepub async fn create_stream(
room: Room,
) -> Result<impl Stream<Item = Vec<IdentityStatusChange>>>
pub async fn create_stream( room: Room, ) -> Result<impl Stream<Item = Vec<IdentityStatusChange>>>
Create a new stream of significant changes to the identity status of members of a room.
The “status” of an identity changes when our level of trust in it changes.
A “significant” change means a warning should either be added or removed (e.g. the user changed from pinned to unpinned (show a warning) or from verification violation to pinned (remove a warning). An insignificant change would be from pinned to verified - no warning is needed in this case.
For example, if an identity is “pinned” i.e. not manually verified, but known, and it becomes a “unpinned” i.e. unknown, because the encryption keys are different and the user has not acknowledged this, then this constitutes a status change. Also, if an identity is “unpinned” and becomes “pinned”, this is also a status change.
The supplied stream is intended to provide enough information for a client to display a list of room members whose identities have changed, and allow the user to acknowledge this or act upon it.
The first item in the stream provides the current state of the room: each member of the room who is not in “pinned” or “verified” state will be included (except the current user).
Note: when an unpinned user leaves a room, an update is generated stating that they have become pinned, even though they may not necessarily have become pinned, but we don’t care any more because they left the room.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IdentityStatusChanges
impl !RefUnwindSafe for IdentityStatusChanges
impl Send for IdentityStatusChanges
impl Sync for IdentityStatusChanges
impl Unpin for IdentityStatusChanges
impl !UnwindSafe for IdentityStatusChanges
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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