pub struct PrincipalRef {
pub id: PrincipalId,
pub kind: PrincipalKind,
}Expand description
Self-describing projection of a principal for request delegation chains.
Fields§
§id: PrincipalIdStable principal id.
kind: PrincipalKindPrincipal kind.
Implementations§
Source§impl PrincipalRef
impl PrincipalRef
Sourcepub fn from_principal(principal: &Principal) -> Self
pub fn from_principal(principal: &Principal) -> Self
Project a full principal into a delegation-chain reference.
Sourcepub fn card_ref(&self) -> Option<&CardRef>
pub fn card_ref(&self) -> Option<&CardRef>
Returns the bound card ref, when this principal has one.
Mirrors Principal::card_ref for the delegation-chain projection.
Sourcepub fn card_ref_scope(&self) -> Option<&CardRefScope>
pub fn card_ref_scope(&self) -> Option<&CardRefScope>
Returns the card scope for card-carrying machine principals.
Mirrors Principal::card_ref_scope for the delegation-chain
projection.
Trait Implementations§
Source§impl Clone for PrincipalRef
impl Clone for PrincipalRef
Source§impl Debug for PrincipalRef
impl Debug for PrincipalRef
Source§impl<'de> Deserialize<'de> for PrincipalRef
impl<'de> Deserialize<'de> for PrincipalRef
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
impl Eq for PrincipalRef
Source§impl PartialEq for PrincipalRef
impl PartialEq for PrincipalRef
Source§impl Serialize for PrincipalRef
impl Serialize for PrincipalRef
impl StructuralPartialEq for PrincipalRef
Auto Trait Implementations§
impl Freeze for PrincipalRef
impl RefUnwindSafe for PrincipalRef
impl Send for PrincipalRef
impl Sync for PrincipalRef
impl Unpin for PrincipalRef
impl UnsafeUnpin for PrincipalRef
impl UnwindSafe for PrincipalRef
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.