Enum const_decoder::Decoder [−][src]
Decoder of a human-friendly encoding, such as hex or base64, into bytes.
Examples
See the crate docs for examples of usage.
Variants
Hexadecimal decoder. Supports uppercase and lowercase digits.
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]
fn clone(&self) -> Decoder
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Decoder
[src]
impl Debug for Decoder
[src]
impl Eq for Decoder
[src]
impl Hash for Decoder
[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<Decoder> for Decoder
[src]
fn eq(&self, other: &Decoder) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for Decoder
[src]
impl StructuralPartialEq for Decoder
[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>,