Struct const_decoder::SkipWhitespace [−][src]
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]
fn clone(&self) -> SkipWhitespace
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for SkipWhitespace
[src]
impl Debug for SkipWhitespace
[src]
impl Eq for SkipWhitespace
[src]
impl Hash for SkipWhitespace
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<SkipWhitespace> for SkipWhitespace
[src]
fn eq(&self, other: &SkipWhitespace) -> bool
[src]
fn ne(&self, other: &SkipWhitespace) -> bool
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,