pub struct SkipWhitespace(pub Decoder);
Expand description

Decoder wrapper that skips whitespace during decoding instead of panicking.

Examples

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

Tuple Fields

0: Decoder

Implementations

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

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

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.

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.