Skip to main content

Module ext

Module ext 

Source
๐Ÿ”ฌThis is a nightly-only experimental API. (proc_macro_internals)
Expand description

Extension traits used by the implementation of quote!. These are defined in separate traits, rather than as a single trait due to ambiguity issues.

These traits expose a quote_into_iter method which should allow calling whichever impl happens to be applicable. Calling that method repeatedly on the returned value should be idempotent.

Re-exportsยง

use core::slice; ๐Ÿ”’
use std::collections::btree_set; ๐Ÿ”’
use std::collections::btree_set::BTreeSet; ๐Ÿ”’
use super::HasIterator as HasIter; ๐Ÿ”’ Experimental
use super::RepInterp; ๐Ÿ”’ Experimental
use super::ThereIsNoIteratorInRepetition as DoesNotHaveIter; ๐Ÿ”’ Experimental
use crate::ToTokens; ๐Ÿ”’ Experimental

Traitsยง

RepAsIteratorExt ๐Ÿ‘ป Experimental
Extension trait providing the quote_into_iter method for types that can be referenced as an iterator.
RepIteratorExt ๐Ÿ‘ป Experimental
Extension trait providing the quote_into_iter method on iterators.
RepToTokensExt ๐Ÿ‘ป Experimental
Extension trait providing the quote_into_iter method for non-iterable types. These types interpolate the same value in each iteration of the repetition.