Skip to main content

RecursiveWrapper

Struct RecursiveWrapper 

Source
pub struct RecursiveWrapper<T, R>(pub T, pub PhantomData<R>);
Expand description

Recursive type parser

Tuple Fields§

§0: T§1: PhantomData<R>

Trait Implementations§

Source§

impl<T, R> Debug for RecursiveWrapper<T, R>
where T: Debug, PhantomData<R>: Debug,

Source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T, R> Parse for RecursiveWrapper<T, R>

Source§

type Error = RecursiveWrapperError<R>

Error type
Source§

fn parse_from(parser: &mut Parser) -> Result<Self, Self::Error>

Parses this type from input, mutating it in-place.
Source§

fn name() -> Option<impl Display>

A name for this type. Read more

Auto Trait Implementations§

§

impl<T, R> Freeze for RecursiveWrapper<T, R>
where T: Freeze,

§

impl<T, R> RefUnwindSafe for RecursiveWrapper<T, R>

§

impl<T, R> Send for RecursiveWrapper<T, R>
where T: Send, R: Send,

§

impl<T, R> Sync for RecursiveWrapper<T, R>
where T: Sync, R: Sync,

§

impl<T, R> Unpin for RecursiveWrapper<T, R>
where T: Unpin, R: Unpin,

§

impl<T, R> UnsafeUnpin for RecursiveWrapper<T, R>
where T: UnsafeUnpin,

§

impl<T, R> UnwindSafe for RecursiveWrapper<T, R>
where T: UnwindSafe, R: UnwindSafe,

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<R, T> FromRecursiveRoot<R> for T
where T: From<R>,

Source§

fn from_recursive_root(root: R, _parser: &mut Parser) -> T

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<R> IntoRecursiveRoot<R> for R

Source§

fn into_recursive_root(self, _parser: &mut Parser) -> R

Source§

impl<T, R> ParsableFrom<RecursiveWrapper<T, R>> for T

Source§

fn from_parsable(wrapper: RecursiveWrapper<T, R>) -> T

Source§

impl<T, U> ParsePeeked<U> for T
where T: Parse + From<U>,

Source§

fn parse_from_with_peeked( _parser: &mut Parser, parsed: U, ) -> Result<T, <T as Parse>::Error>

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<R> TryFromRecursiveRoot<R> for R

Source§

fn try_from_recursive_root(root: R, _parser: &mut Parser) -> Option<R>

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.