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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for VerificationState
impl PartialEq for VerificationState
Source§impl Serialize for VerificationState
impl Serialize for VerificationState
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.