pub struct AuthenticatedRecipientMode { /* private fields */ }Expand description
Recipient mode established by a successful authenticated decrypt.
Constructed only inside the decrypt path after a recipient unwraps and
the header MAC verifies. Cannot be forged from an
UnauthenticatedRecipientMode: the wrapping struct has a private field
and a pub(crate) constructor, so external callers can match on the
exposed AuthenticatedRecipientModeKind but cannot manufacture a value
that claims to be authenticated.
Surfaced on DecryptOutcome::recipient_mode.
Implementations§
Source§impl AuthenticatedRecipientMode
impl AuthenticatedRecipientMode
Sourcepub const fn kind(&self) -> AuthenticatedRecipientModeKind
pub const fn kind(&self) -> AuthenticatedRecipientModeKind
Returns the public discriminant for match ergonomics.
Sourcepub const fn is_passphrase(&self) -> bool
pub const fn is_passphrase(&self) -> bool
true if the file authenticated as a passphrase recipient.
Sourcepub const fn is_public_key(&self) -> bool
pub const fn is_public_key(&self) -> bool
true if the file authenticated as a public-key recipient.
Trait Implementations§
Source§impl Clone for AuthenticatedRecipientMode
impl Clone for AuthenticatedRecipientMode
Source§fn clone(&self) -> AuthenticatedRecipientMode
fn clone(&self) -> AuthenticatedRecipientMode
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 moreimpl Copy for AuthenticatedRecipientMode
Source§impl Debug for AuthenticatedRecipientMode
impl Debug for AuthenticatedRecipientMode
Source§impl Display for AuthenticatedRecipientMode
impl Display for AuthenticatedRecipientMode
impl Eq for AuthenticatedRecipientMode
impl StructuralPartialEq for AuthenticatedRecipientMode
Auto Trait Implementations§
impl Freeze for AuthenticatedRecipientMode
impl RefUnwindSafe for AuthenticatedRecipientMode
impl Send for AuthenticatedRecipientMode
impl Sync for AuthenticatedRecipientMode
impl Unpin for AuthenticatedRecipientMode
impl UnsafeUnpin for AuthenticatedRecipientMode
impl UnwindSafe for AuthenticatedRecipientMode
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