TakeExact

Struct TakeExact 

Source
pub struct TakeExact<const A: usize>(/* private fields */);

Trait Implementations§

Source§

impl<I: InputType, E: ParserExtras<I>, const A: usize> Parser<I, [<I as InputType>::Token; A], E> for TakeExact<A>

Source§

fn parse<'parse>( &self, inp: Input<'parse, I, E>, ) -> IResult<'parse, I, E, [I::Token; A]>

Errors Read more
Source§

fn check<'parse>(&self, inp: Input<'parse, I, E>) -> IResult<'parse, I, E, ()>

Errors Read more
Source§

fn parse_from<'parse>(&self, input: &'parse I) -> ParseResult<'parse, I, O, E>
where E: ParserExtras<I, Context = ()>,

Source§

fn or<P: Parser<I, O, E>>(self, other: P) -> Or<Self, P>
where Self: Sized,

Source§

fn map<U, F: Fn(O) -> U>(self, mapper: F) -> Map<Self, O, F, U>
where Self: Sized,

Transforms this parser’s output with the mapper function. The mapper function cannot return an error. If you want to, consider using Parser::try_map Read more
Source§

fn to<U>(self, value: U) -> To<Self, O, U>
where Self: Sized,

Source§

fn ignored(self) -> Ignored<Self, O>
where Self: Sized,

Source§

fn try_map<F: Fn(U) -> Result<U, E::Error>, U>( self, f: F, ) -> TryMap<Self, F, O, U>
where Self: Sized,

Source§

fn try_map_with_span<F: Fn(U, Range<I::Offset>) -> Result<U, E::Error>, U>( self, f: F, ) -> TryMapWithSpan<Self, F, O, U>
where Self: Sized,

Source§

fn filter<F: Fn(&O) -> bool>(self, f: F) -> FilterParser<Self, F, O>
where Self: Sized,

Source§

fn repeated(self) -> Repeated<Self, O, Vec<O>>
where Self: Sized,

Example Read more
Source§

fn repeated_custom<V: FromIterator<O>>(self) -> Repeated<Self, O, V>
where Self: Sized,

Source§

fn slice<'a>(self) -> Slice<'a, I, E, O, Self>
where I: SliceInput<'a>, Self: Sized,

Source§

fn then<O2, P: Parser<I, O2, E>>( self, other: P, ) -> Then<O, O2, Self, P, true, false>
where Self: Sized,

Source§

fn ignore_then<O2, P: Parser<I, O2, E>>( self, other: P, ) -> Then<O, O2, Self, P, false, true>
where Self: Sized,

Source§

fn then_ignore<O2, P: Parser<I, O2, E>>( self, other: P, ) -> Then<O, O2, Self, P, false, false>
where Self: Sized,

Source§

fn optional(self) -> Maybe<Self>
where Self: Sized,

Auto Trait Implementations§

§

impl<const A: usize> Freeze for TakeExact<A>

§

impl<const A: usize> RefUnwindSafe for TakeExact<A>

§

impl<const A: usize> Send for TakeExact<A>

§

impl<const A: usize> Sync for TakeExact<A>

§

impl<const A: usize> Unpin for TakeExact<A>

§

impl<const A: usize> UnwindSafe for TakeExact<A>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.