Enum const_decoder::Decoder [−][src]
#[non_exhaustive]
pub enum Decoder {
Hex,
Base64,
Base64Url,
Custom(Encoding),
}
Expand description
Decoder of a human-friendly encoding, such as hex or base64, into bytes.
Examples
See the crate docs for examples of usage.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Hexadecimal decoder. Supports uppercase and lowercase digits.
Base64 decoder accepting standard encoding as per RFC 3548. Does not require padding, but works fine with it.
Base64 decoder accepting URL / filesystem-safe encoding as per RFC 3548. Does not require padding, but works fine with it.
Custom(Encoding)
Decoder based on a custom Encoding
.
Tuple Fields of Custom
0: Encoding
Implementations
Makes this decoder skip whitespace chars rather than panicking on encountering them.