pub enum VerificationState {
Verified,
Unverified(VerificationLevel),
}
Expand description
Represents the state of verification for a decrypted message sent by a device.
Variants§
Verified
This message is guaranteed to be authentic as it is coming from a device belonging to a user that we have verified.
This is the only state where authenticity can be guaranteed.
Unverified(VerificationLevel)
The message could not be linked to a verified device.
For more detailed information on why the message is considered unverified, refer to the VerificationLevel sub-enum.
Implementations§
source§impl VerificationState
impl VerificationState
sourcepub fn to_shield_state_strict(&self) -> ShieldState
pub fn to_shield_state_strict(&self) -> ShieldState
Convert the VerificationState
into a ShieldState
which can be
directly used to decorate messages in the recommended way.
This method decorates messages using a strict ruleset, for a more lax
variant of this method take a look at
VerificationState::to_shield_state_lax()
.
sourcepub fn to_shield_state_lax(&self) -> ShieldState
pub fn to_shield_state_lax(&self) -> ShieldState
Convert the VerificationState
into a ShieldState
which can be used
to decorate messages in the recommended way.
This implements a legacy, lax decoration mode.
For a more strict variant of this method take a look at
VerificationState::to_shield_state_strict()
.
Trait Implementations§
source§impl Clone for VerificationState
impl Clone for VerificationState
source§fn clone(&self) -> VerificationState
fn clone(&self) -> VerificationState
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for VerificationState
impl Debug for VerificationState
source§impl<'de> Deserialize<'de> for VerificationState
impl<'de> Deserialize<'de> for VerificationState
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<VerificationState, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<VerificationState, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl From<OldVerificationStateHelper> for VerificationState
impl From<OldVerificationStateHelper> for VerificationState
source§fn from(value: OldVerificationStateHelper) -> VerificationState
fn from(value: OldVerificationStateHelper) -> VerificationState
source§impl PartialEq for VerificationState
impl PartialEq for VerificationState
source§fn eq(&self, other: &VerificationState) -> bool
fn eq(&self, other: &VerificationState) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for VerificationState
impl Serialize for VerificationState
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for VerificationState
impl StructuralPartialEq for VerificationState
Auto Trait Implementations§
impl Freeze for VerificationState
impl RefUnwindSafe for VerificationState
impl Send for VerificationState
impl Sync for VerificationState
impl Unpin for VerificationState
impl UnwindSafe for VerificationState
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
)§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<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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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