Struct macroex::MultiExtractor

source ·
pub struct MultiExtractor<T>(pub T);
Expand description

Extracts multiple items sequentiallly.

Example:

let MultiExtractor((a, b, c)) = quote!(1 2.0 '3').into_iter().extract()?;
assert_eq!(a, 1);
assert_eq!(b, 2.0);
assert_eq!(c, '3');

Tuple Fields§

§0: T

Trait Implementations§

source§

impl<T: Debug> Debug for MultiExtractor<T>

source§

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

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

impl<A, B, C, D, E, F, G, H, I, J, K, L> Extractor for MultiExtractor<(A, B, C, D, E, F, G, H, I, J, K, L)>

source§

fn extract(iter: &mut impl Iterator<Item = TokenTree>) -> Result<Self, Error>

source§

impl<B, C, D, E, F, G, H, I, J, K, L> Extractor for MultiExtractor<(B, C, D, E, F, G, H, I, J, K, L)>

source§

fn extract(iter: &mut impl Iterator<Item = TokenTree>) -> Result<Self, Error>

source§

impl<C, D, E, F, G, H, I, J, K, L> Extractor for MultiExtractor<(C, D, E, F, G, H, I, J, K, L)>

source§

fn extract(iter: &mut impl Iterator<Item = TokenTree>) -> Result<Self, Error>

source§

impl<D, E, F, G, H, I, J, K, L> Extractor for MultiExtractor<(D, E, F, G, H, I, J, K, L)>

source§

fn extract(iter: &mut impl Iterator<Item = TokenTree>) -> Result<Self, Error>

source§

impl<E, F, G, H, I, J, K, L> Extractor for MultiExtractor<(E, F, G, H, I, J, K, L)>

source§

fn extract(iter: &mut impl Iterator<Item = TokenTree>) -> Result<Self, Error>

source§

impl<F, G, H, I, J, K, L> Extractor for MultiExtractor<(F, G, H, I, J, K, L)>

source§

fn extract(iter: &mut impl Iterator<Item = TokenTree>) -> Result<Self, Error>

source§

impl<G, H, I, J, K, L> Extractor for MultiExtractor<(G, H, I, J, K, L)>

source§

fn extract(iter: &mut impl Iterator<Item = TokenTree>) -> Result<Self, Error>

source§

impl<H, I, J, K, L> Extractor for MultiExtractor<(H, I, J, K, L)>
where H: Extractor, I: Extractor, J: Extractor, K: Extractor, L: Extractor,

source§

fn extract(iter: &mut impl Iterator<Item = TokenTree>) -> Result<Self, Error>

source§

impl<I, J, K, L> Extractor for MultiExtractor<(I, J, K, L)>
where I: Extractor, J: Extractor, K: Extractor, L: Extractor,

source§

fn extract(iter: &mut impl Iterator<Item = TokenTree>) -> Result<Self, Error>

source§

impl<J, K, L> Extractor for MultiExtractor<(J, K, L)>
where J: Extractor, K: Extractor, L: Extractor,

source§

fn extract(iter: &mut impl Iterator<Item = TokenTree>) -> Result<Self, Error>

source§

impl<K, L> Extractor for MultiExtractor<(K, L)>
where K: Extractor, L: Extractor,

source§

fn extract(iter: &mut impl Iterator<Item = TokenTree>) -> Result<Self, Error>

source§

impl<L> Extractor for MultiExtractor<(L,)>
where L: Extractor,

source§

fn extract(iter: &mut impl Iterator<Item = TokenTree>) -> Result<Self, Error>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for MultiExtractor<T>
where T: RefUnwindSafe,

§

impl<T> Send for MultiExtractor<T>
where T: Send,

§

impl<T> Sync for MultiExtractor<T>
where T: Sync,

§

impl<T> Unpin for MultiExtractor<T>
where T: Unpin,

§

impl<T> UnwindSafe for MultiExtractor<T>
where T: 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<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>,

§

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>,

§

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.