Struct nommy::bytes::OneInRange[][src]

pub struct OneInRange<const BYTE_RANGE: RangeInclusive<u8>>(_);

OneInRange is a generic type that implements Parse to match one character within the given range

use nommy::{Parse, IntoBuf, bytes::OneInRange};
let mut buffer = (5..).into_buf();
let c: u8 = OneInRange::<{0..=10}>::parse(&mut buffer).unwrap().into();
assert_eq!(c, 5);

Trait Implementations

impl<const BYTE_RANGE: RangeInclusive<u8>> Clone for OneInRange<BYTE_RANGE>[src]

impl<const BYTE_RANGE: RangeInclusive<u8>> Copy for OneInRange<BYTE_RANGE>[src]

impl<const BYTE_RANGE: RangeInclusive<u8>> Debug for OneInRange<BYTE_RANGE>[src]

impl<const BYTE_RANGE: RangeInclusive<u8>> Into<u8> for OneInRange<BYTE_RANGE>[src]

impl<const BYTE_RANGE: RangeInclusive<u8>> Parse<u8> for OneInRange<BYTE_RANGE>[src]

impl<const BYTE_RANGE: RangeInclusive<u8>> PartialEq<OneInRange<BYTE_RANGE>> for OneInRange<BYTE_RANGE>[src]

impl<const BYTE_RANGE: RangeInclusive<u8>> Peek<u8> for OneInRange<BYTE_RANGE>[src]

impl<const BYTE_RANGE: RangeInclusive<u8>> StructuralPartialEq for OneInRange<BYTE_RANGE>[src]

Auto Trait Implementations

impl<const BYTE_RANGE: RangeInclusive<u8>> RefUnwindSafe for OneInRange<BYTE_RANGE>[src]

impl<const BYTE_RANGE: RangeInclusive<u8>> Send for OneInRange<BYTE_RANGE>[src]

impl<const BYTE_RANGE: RangeInclusive<u8>> Sync for OneInRange<BYTE_RANGE>[src]

impl<const BYTE_RANGE: RangeInclusive<u8>> Unpin for OneInRange<BYTE_RANGE>[src]

impl<const BYTE_RANGE: RangeInclusive<u8>> UnwindSafe for OneInRange<BYTE_RANGE>[src]

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.