pub enum Identity {
Email(String),
KeyId(String),
Hash(String),
}Expand description
One of the supported identity shapes. Stored as the key of the public compartment’s HashMap; serialised to a canonical string for FFI and backend persistence.
Variants§
Email(String)
RFC 5321 mailbox, e.g. alice@example.com.
KeyId(String)
Opaque key identifier (hex, base32, fingerprint — the Store does not impose a format; it only uses the bytes for lookup).
Hash(String)
Raw cryptographic hash of an identity document, hex-encoded.
Implementations§
Source§impl Identity
impl Identity
Sourcepub fn from_kind(kind: &str, value: &str) -> Self
pub fn from_kind(kind: &str, value: &str) -> Self
Parse a (kind, value) pair coming from the FFI into a typed
identity. kind is ASCII, case-sensitive. Unknown kinds return
the raw string as a Identity::Hash so legacy callers keep
working — a future stricter revision can promote this to an error.
Trait Implementations§
impl Eq for Identity
impl StructuralPartialEq for Identity
Auto Trait Implementations§
impl Freeze for Identity
impl RefUnwindSafe for Identity
impl Send for Identity
impl Sync for Identity
impl Unpin for Identity
impl UnsafeUnpin for Identity
impl UnwindSafe for Identity
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