pub struct Principal { /* private fields */ }Expand description
Public identity and key descriptor for an access subject.
Implementations§
Source§impl Principal
impl Principal
Sourcepub fn principal_id(&self) -> &str
pub fn principal_id(&self) -> &str
Stable subject identifier.
Sourcepub const fn kind(&self) -> PrincipalKind
pub const fn kind(&self) -> PrincipalKind
Principal category.
Sourcepub const fn wrapping_public_key(&self) -> [u8; 32]
pub const fn wrapping_public_key(&self) -> [u8; 32]
X25519 public key used for role-key grants.
Sourcepub const fn signing_public_key(&self) -> [u8; 32]
pub const fn signing_public_key(&self) -> [u8; 32]
Ed25519 public key used for authored access events.
Sourcepub fn decode(
bytes: &[u8],
policy: &AccessValidationPolicy,
) -> Result<Self, AccessError>
pub fn decode( bytes: &[u8], policy: &AccessValidationPolicy, ) -> Result<Self, AccessError>
Decode and validate a canonical principal.
Trait Implementations§
impl Eq for Principal
impl StructuralPartialEq for Principal
Auto Trait Implementations§
impl Freeze for Principal
impl RefUnwindSafe for Principal
impl Send for Principal
impl Sync for Principal
impl Unpin for Principal
impl UnsafeUnpin for Principal
impl UnwindSafe for Principal
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