pub enum PrincipalPosture {
Omitted,
Sent {
mapping_version: String,
scope: String,
source: Arc<dyn PrincipalSource>,
},
}Expand description
The principal wire posture of a client.
Variants§
Omitted
The default: no principal byte is ever sent.
Sent
Send the reference in the identified request field.
Implementations§
Source§impl PrincipalPosture
impl PrincipalPosture
Sourcepub fn validate(
&self,
operator: EndpointOperator,
protocol_major: u32,
) -> Result<PrincipalWire, PrincipalConfigError>
pub fn validate( &self, operator: EndpointOperator, protocol_major: u32, ) -> Result<PrincipalWire, PrincipalConfigError>
Check the posture against the endpoint and protocol, and give the binding’s view of it.
Sourcepub fn for_attempt(
&self,
principal_handle: &[u8],
) -> Result<Option<WirePrincipal>, ()>
pub fn for_attempt( &self, principal_handle: &[u8], ) -> Result<Option<WirePrincipal>, ()>
The reference to send for an attempt with principal_handle:
Ok(None) when omitted, Err(()) when the posture requires one and
the source has none within its bounds (refused before send).
Trait Implementations§
Source§impl Clone for PrincipalPosture
impl Clone for PrincipalPosture
Source§impl Debug for PrincipalPosture
impl Debug for PrincipalPosture
Auto Trait Implementations§
impl !RefUnwindSafe for PrincipalPosture
impl !UnwindSafe for PrincipalPosture
impl Freeze for PrincipalPosture
impl Send for PrincipalPosture
impl Sync for PrincipalPosture
impl Unpin for PrincipalPosture
impl UnsafeUnpin for PrincipalPosture
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