pub enum UserIdentityData {
Own(OwnUserIdentityData),
Other(OtherUserIdentityData),
}
Expand description
Enum over the different user identity types we can have.
Variants§
Own(OwnUserIdentityData)
Our own user identity.
Other(OtherUserIdentityData)
The identity of another user.
Implementations§
Source§impl UserIdentityData
impl UserIdentityData
Sourcepub fn master_key(&self) -> &MasterPubkey
pub fn master_key(&self) -> &MasterPubkey
Get the master key of the identity.
Sourcepub fn self_signing_key(&self) -> &SelfSigningPubkey
pub fn self_signing_key(&self) -> &SelfSigningPubkey
Get the SelfSigningPubkey
key of the identity.
Sourcepub fn user_signing_key(&self) -> Option<&UserSigningPubkey>
pub fn user_signing_key(&self) -> Option<&UserSigningPubkey>
Get the user-signing key of the identity, this is only present for our own user identity..
Sourcepub fn was_previously_verified(&self) -> bool
pub fn was_previously_verified(&self) -> bool
True if we verified our own identity at some point in the past.
To reset this latch back to false
, one must call
UserIdentity::withdraw_verification()
.
Sourcepub fn own(&self) -> Option<&OwnUserIdentityData>
pub fn own(&self) -> Option<&OwnUserIdentityData>
Convert the enum into a reference OwnUserIdentityData
if it’s of
the correct type.
Sourcepub fn other(&self) -> Option<&OtherUserIdentityData>
pub fn other(&self) -> Option<&OtherUserIdentityData>
Convert the enum into a reference to OtherUserIdentityData
if
it’s of the correct type.
Trait Implementations§
Source§impl Clone for UserIdentityData
impl Clone for UserIdentityData
Source§fn clone(&self) -> UserIdentityData
fn clone(&self) -> UserIdentityData
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for UserIdentityData
impl Debug for UserIdentityData
Source§impl<'de> Deserialize<'de> for UserIdentityData
impl<'de> Deserialize<'de> for UserIdentityData
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<OtherUserIdentityData> for UserIdentityData
impl From<OtherUserIdentityData> for UserIdentityData
Source§fn from(identity: OtherUserIdentityData) -> Self
fn from(identity: OtherUserIdentityData) -> Self
Converts to this type from the input type.
Source§impl From<OwnUserIdentityData> for UserIdentityData
impl From<OwnUserIdentityData> for UserIdentityData
Source§fn from(identity: OwnUserIdentityData) -> Self
fn from(identity: OwnUserIdentityData) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for UserIdentityData
impl RefUnwindSafe for UserIdentityData
impl Send for UserIdentityData
impl Sync for UserIdentityData
impl Unpin for UserIdentityData
impl UnwindSafe for UserIdentityData
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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