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 4880). This automatism can be disabled and fine-tuned using PacketParserBuilder::dearmor.

Variants§

§

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§

Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.