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