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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> CompatExt for T
impl<T> CompatExt for T
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>
Consume a handle, getting back the initial
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>
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