pub struct PrincipalV1 {
pub kind: PrincipalKindV1,
pub id: Option<ProtocolReference>,
}Expand description
Who requested the context. Unknown never carries an id; every other
kind must.
Fields§
§kind: PrincipalKindV1§id: Option<ProtocolReference>Implementations§
Source§impl PrincipalV1
impl PrincipalV1
pub fn new( kind: PrincipalKindV1, id: ProtocolReference, ) -> Result<Self, ValidationError>
pub fn unknown() -> Self
pub fn is_known(&self) -> bool
Trait Implementations§
Source§impl Clone for PrincipalV1
impl Clone for PrincipalV1
Source§impl Debug for PrincipalV1
impl Debug for PrincipalV1
Source§impl<'de> Deserialize<'de> for PrincipalV1
impl<'de> Deserialize<'de> for PrincipalV1
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PrincipalV1
Source§impl Hash for PrincipalV1
impl Hash for PrincipalV1
Source§impl Ord for PrincipalV1
impl Ord for PrincipalV1
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for PrincipalV1
impl PartialEq for PrincipalV1
Source§impl PartialOrd for PrincipalV1
impl PartialOrd for PrincipalV1
Source§impl Serialize for PrincipalV1
impl Serialize for PrincipalV1
impl StructuralPartialEq for PrincipalV1
Auto Trait Implementations§
impl Freeze for PrincipalV1
impl RefUnwindSafe for PrincipalV1
impl Send for PrincipalV1
impl Sync for PrincipalV1
impl Unpin for PrincipalV1
impl UnsafeUnpin for PrincipalV1
impl UnwindSafe for PrincipalV1
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