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§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§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§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>
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