pub struct Take;Expand description
Keeps only the first N tokens from the stream.
§Arguments
This takes a single syn::LitInt as argument (e.g., [[ 3 ]]).
§Example
[< a b c d >]:take[[2]]->a b
Trait Implementations§
Source§impl Ord for Take
impl Ord for Take
Source§impl PartialOrd for Take
impl PartialOrd for Take
impl Copy for Take
impl Eq for Take
impl StructuralPartialEq for Take
Auto Trait Implementations§
impl Freeze for Take
impl RefUnwindSafe for Take
impl Send for Take
impl Sync for Take
impl Unpin for Take
impl UnsafeUnpin for Take
impl UnwindSafe for Take
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Transformer for T
impl<T> Transformer for T
Source§fn transform(
&mut self,
input: TokenStream,
argument: TokenStream,
) -> Result<TokenStream, Error>
fn transform( &mut self, input: TokenStream, argument: TokenStream, ) -> Result<TokenStream, Error>
Transforms an input token stream into an output one. Read more