Enum matrix_sdk_crypto::IdentityState
source · pub enum IdentityState {
Verified,
Pinned,
PinViolation,
VerificationViolation,
}
Expand description
The state of an identity - verified, pinned etc.
Variants§
Verified
The user is verified with us
Pinned
Either this is the first identity we have seen for this user, or the user has acknowledged a change of identity explicitly e.g. by clicking OK on a notification.
PinViolation
The user’s identity has changed since it was pinned. The user should be
notified about this and given the opportunity to acknowledge the
change, which will make the new identity pinned.
When the user acknowledges the change, the app should call
crate::OtherUserIdentity::pin_current_master_key
.
VerificationViolation
The user’s identity has changed, and before that it was verified. This
is a serious problem. The user can either verify again to make this
identity verified, or withdraw verification
UserIdentity::withdraw_verification
to make it pinned.
Trait Implementations§
source§impl Clone for IdentityState
impl Clone for IdentityState
source§fn clone(&self) -> IdentityState
fn clone(&self) -> IdentityState
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<UT> ConvertError<UT> for IdentityState
impl<UT> ConvertError<UT> for IdentityState
fn try_convert_unexpected_callback_error( e: UnexpectedUniFFICallbackError, ) -> Result<Self>
source§impl Debug for IdentityState
impl Debug for IdentityState
source§impl<UT> FfiConverter<UT> for IdentityState
impl<UT> FfiConverter<UT> for IdentityState
§type FfiType = RustBuffer
type FfiType = RustBuffer
source§fn lower(v: Self) -> RustBuffer
fn lower(v: Self) -> RustBuffer
source§fn try_lift(buf: RustBuffer) -> Result<Self>
fn try_lift(buf: RustBuffer) -> Result<Self>
source§fn write(obj: Self, buf: &mut Vec<u8>)
fn write(obj: Self, buf: &mut Vec<u8>)
source§fn try_read(buf: &mut &[u8]) -> Result<Self>
fn try_read(buf: &mut &[u8]) -> Result<Self>
source§const TYPE_ID_META: MetadataBuffer = _
const TYPE_ID_META: MetadataBuffer = _
source§impl<UT> Lift<UT> for IdentityState
impl<UT> Lift<UT> for IdentityState
source§impl<UT> LiftRef<UT> for IdentityState
impl<UT> LiftRef<UT> for IdentityState
type LiftType = IdentityState
source§impl<UT> LiftReturn<UT> for IdentityState
impl<UT> LiftReturn<UT> for IdentityState
§type ReturnType = <IdentityState as Lift<UT>>::FfiType
type ReturnType = <IdentityState as Lift<UT>>::FfiType
source§fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
source§fn lift_foreign_return(
ffi_return: Self::ReturnType,
call_status: RustCallStatus,
) -> Self
fn lift_foreign_return( ffi_return: Self::ReturnType, call_status: RustCallStatus, ) -> Self
source§fn lift_error(_buf: RustBuffer) -> Self
fn lift_error(_buf: RustBuffer) -> Self
source§fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
source§impl<UT> Lower<UT> for IdentityState
impl<UT> Lower<UT> for IdentityState
type FfiType = <IdentityState as FfiConverter<UT>>::FfiType
fn lower(obj: Self) -> Self::FfiType
fn write(obj: Self, buf: &mut Vec<u8>)
source§fn lower_into_rust_buffer(obj: Self) -> RustBuffer
fn lower_into_rust_buffer(obj: Self) -> RustBuffer
source§impl<UT> LowerError<UT> for IdentityState
impl<UT> LowerError<UT> for IdentityState
source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
source§impl<UT> LowerReturn<UT> for IdentityState
impl<UT> LowerReturn<UT> for IdentityState
§type ReturnType = <IdentityState as Lower<UT>>::FfiType
type ReturnType = <IdentityState as Lower<UT>>::FfiType
source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustBuffer>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustBuffer>
source§impl Ord for IdentityState
impl Ord for IdentityState
source§fn cmp(&self, other: &IdentityState) -> Ordering
fn cmp(&self, other: &IdentityState) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for IdentityState
impl PartialEq for IdentityState
source§fn eq(&self, other: &IdentityState) -> bool
fn eq(&self, other: &IdentityState) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for IdentityState
impl PartialOrd for IdentityState
source§fn partial_cmp(&self, other: &IdentityState) -> Option<Ordering>
fn partial_cmp(&self, other: &IdentityState) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<UT> TypeId<UT> for IdentityState
impl<UT> TypeId<UT> for IdentityState
const TYPE_ID_META: MetadataBuffer = _
impl Eq for IdentityState
impl StructuralPartialEq for IdentityState
Auto Trait Implementations§
impl Freeze for IdentityState
impl RefUnwindSafe for IdentityState
impl Send for IdentityState
impl Sync for IdentityState
impl Unpin for IdentityState
impl UnwindSafe for IdentityState
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> CompatExt for T
impl<T> CompatExt for T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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