#[non_exhaustive]pub enum Dearmor {
Enabled(ReaderMode),
Disabled,
Auto(ReaderMode),
}Expand description
Controls transparent stripping of ASCII armor when parsing.
When parsing OpenPGP data streams, the PacketParser will by
default automatically detect and remove any ASCII armor encoding
(see Section 6 of RFC 9580). This automatism can be disabled
and fine-tuned using PacketParserBuilder::dearmor.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Enabled(ReaderMode)
Unconditionally treat the input as if it were an OpenPGP message encoded using ASCII armor.
Parsing a binary encoded OpenPGP message using this mode will
fail. The ReaderMode allow further customization of the
ASCII armor parser.
Disabled
Unconditionally treat the input as if it were a binary OpenPGP message.
Parsing an ASCII armor encoded OpenPGP message using this mode will fail.
Auto(ReaderMode)
If input does not appear to be a binary encoded OpenPGP message, treat it as if it were encoded using ASCII armor.
This is the default. The ReaderMode allow further
customization of the ASCII armor parser.
Trait Implementations§
impl StructuralPartialEq for Dearmor
Auto Trait Implementations§
impl Freeze for Dearmor
impl RefUnwindSafe for Dearmor
impl Send for Dearmor
impl Sync for Dearmor
impl Unpin for Dearmor
impl UnsafeUnpin for Dearmor
impl UnwindSafe for Dearmor
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more