Struct const_decoder::SkipWhitespace[][src]

pub struct SkipWhitespace(pub Decoder);

Decoder wrapper that skips whitespace during decoding instead of panicking.

Examples

const KEY: [u8; 64] = SkipWhitespace(Decoder::Hex).parse(b"
    9e55d1e1 aa1f455b 8baad9fd f9755036 55f8b359 d542fa7e
    4ce84106 d625b352 06fac1f2 2240cffd 637ead66 47188429
    fafda9c9 cb7eae43 386ac17f 61115075
");

Implementations

impl SkipWhitespace[src]

pub const fn parse<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 SkipWhitespace[src]

impl Copy for SkipWhitespace[src]

impl Debug for SkipWhitespace[src]

impl Eq for SkipWhitespace[src]

impl Hash for SkipWhitespace[src]

impl PartialEq<SkipWhitespace> for SkipWhitespace[src]

impl StructuralEq for SkipWhitespace[src]

impl StructuralPartialEq for SkipWhitespace[src]

Auto Trait Implementations

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.