pub enum SessionSubject {
Persona {
persona_id: String,
},
Wallet {
wallet_address: String,
persona_id: Option<String>,
},
}Expand description
Which credential rooted a session.
A persona-credential login always resolves a persona (enrollment requires
one). A wallet-passkey login may resolve to a linked, STATUS_LINKED
persona, or to none at all — a wallet with no persona is a standing,
permanent state (ADR 0007), not a transitional or error one.
Variants§
Persona
Rooted in a PersonaCredential login.
Wallet
Rooted in a wallet-passkey login (a stateless signature-recovery
check — see polyc-wallet-delegation’s envelope verification, ADR
0007 — never a control-plane-held credential registry).
Implementations§
Source§impl SessionSubject
impl SessionSubject
Sourcepub fn persona_id(&self) -> Option<&str>
pub fn persona_id(&self) -> Option<&str>
The persona this subject is bound to, if any — Some for every
Self::Persona and for a Self::Wallet that currently resolves
to one.
Sourcepub fn wallet_address(&self) -> Option<&str>
pub fn wallet_address(&self) -> Option<&str>
The wallet address this subject is bound to, if it is a wallet-rooted session.
Trait Implementations§
Source§impl Clone for SessionSubject
impl Clone for SessionSubject
Source§fn clone(&self) -> SessionSubject
fn clone(&self) -> SessionSubject
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SessionSubject
impl Debug for SessionSubject
impl Eq for SessionSubject
Source§impl PartialEq for SessionSubject
impl PartialEq for SessionSubject
impl StructuralPartialEq for SessionSubject
Auto Trait Implementations§
impl Freeze for SessionSubject
impl RefUnwindSafe for SessionSubject
impl Send for SessionSubject
impl Sync for SessionSubject
impl Unpin for SessionSubject
impl UnsafeUnpin for SessionSubject
impl UnwindSafe for SessionSubject
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§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§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
Compare self to
key and return true if they are equal.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