Enum const_decoder::Decoder[][src]

pub enum Decoder {
    Hex,
    Base64,
}

Decoder of a human-friendly encoding, such as hex or base64, into bytes.

Examples

See the crate docs for examples of usage.

Variants

Hex

Hexadecimal decoder. Supports uppercase and lowercase digits.

Base64

Base64 decoder. Does not require padding, but works fine with it.

Implementations

impl Decoder[src]

pub const fn skip_whitespace(self) -> SkipWhitespace[src]

Marks that this coder should skip whitespace chars rather than panic on them.

pub const fn decode<const N: usize>(self, input: &[u8]) -> [u8; N][src]

Decodes input into a byte array.

Panics

  • Panics if the provided length is insufficient or too large for input.
  • Panics if input contains invalid chars.

Trait Implementations

impl Clone for Decoder[src]

impl Copy for Decoder[src]

impl Debug for Decoder[src]

impl Eq for Decoder[src]

impl Hash for Decoder[src]

impl PartialEq<Decoder> for Decoder[src]

impl StructuralEq for Decoder[src]

impl StructuralPartialEq for Decoder[src]

Auto Trait Implementations

impl Send for Decoder

impl Sync for Decoder

impl Unpin for Decoder

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.