Struct Boxed

Source
pub struct Boxed<'b, I: InputType, O, E: ParserExtras<I>> { /* private fields */ }
Expand description

See Parser::boxed.

Due to current implementation details, the inner value is not, in fact, a Box, but is an [Rc] to facilitate efficient cloning. This is likely to change in the future. Unlike Box, [Rc] has no size guarantees: although it is currently the same size as a raw pointer.

Trait Implementations§

Source§

impl<'b, I: InputType, O, E: ParserExtras<I>> Clone for Boxed<'b, I, O, E>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'b, I, O, E> Parser<I, O, E> for Boxed<'b, I, O, E>
where I: InputType, E: ParserExtras<I>,

Source§

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

Errors Read more
Source§

fn check<'parse>(&self, input: 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<'b, I, O, E> Freeze for Boxed<'b, I, O, E>

§

impl<'b, I, O, E> !RefUnwindSafe for Boxed<'b, I, O, E>

§

impl<'b, I, O, E> !Send for Boxed<'b, I, O, E>

§

impl<'b, I, O, E> !Sync for Boxed<'b, I, O, E>

§

impl<'b, I, O, E> Unpin for Boxed<'b, I, O, E>

§

impl<'b, I, O, E> !UnwindSafe for Boxed<'b, I, O, E>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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<'p, T> Seq<'p, T> for T
where T: Clone,

Source§

type Item<'a> = &'a T where T: 'a

The item yielded by the iterator.
Source§

type Iter<'a> = Once<&'a T> where T: 'a

An iterator over the items within this container, by reference.
Source§

fn seq_iter(&self) -> <T as Seq<'p, T>>::Iter<'_>

Iterate over the elements of the container.
Source§

fn contains(&self, val: &T) -> bool
where T: PartialEq,

Check whether an item is contained within this sequence.
Source§

fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> MaybeDeref<T, &'p T>
where 'p: 'b,

Convert an item of the sequence into a MaybeRef.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<'p, T> OrderedSeq<'p, T> for T
where T: Clone,