Struct flexi_parse::TokenStream
source · pub struct TokenStream { /* private fields */ }
Expand description
A sequence of tokens.
This is the return type of
Group::token_stream
, and can be created
from a proc_macro::TokenStream
or
proc_macro2::TokenStream
.
Implementations§
source§impl TokenStream
impl TokenStream
sourcepub fn prepare_whitespace(&mut self)
pub fn prepare_whitespace(&mut self)
Removes all whitespace that doesn’t come at the start of a line.
Note that the parse*
functions remove all whitespace.
sourcepub fn remove_blank_space(&mut self)
pub fn remove_blank_space(&mut self)
Removes all non-newline whitespace from self
.
Note that the parse*
functions will remove all whitespace.
sourcepub fn remove_whitespace(&mut self)
pub fn remove_whitespace(&mut self)
Removes all whitespace tokens from this stream.
This method is automatically called by the parse*
functions.
Trait Implementations§
source§impl Clone for TokenStream
impl Clone for TokenStream
source§fn clone(&self) -> TokenStream
fn clone(&self) -> TokenStream
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TokenStream
impl Debug for TokenStream
source§impl Display for TokenStream
impl Display for TokenStream
source§impl From<TokenStream> for TokenStream
Available on crate features proc-macro
and proc-macro2
only.
impl From<TokenStream> for TokenStream
Available on crate features
proc-macro
and proc-macro2
only.source§fn from(value: TokenStream) -> Self
fn from(value: TokenStream) -> Self
Converts to this type from the input type.
source§impl From<TokenStream> for TokenStream
Available on crate feature proc-macro2
only.
impl From<TokenStream> for TokenStream
Available on crate feature
proc-macro2
only.source§fn from(value: TokenStream2) -> Self
fn from(value: TokenStream2) -> Self
Converts to this type from the input type.
source§impl PartialEq<TokenStream> for TokenStream
impl PartialEq<TokenStream> for TokenStream
source§fn eq(&self, other: &TokenStream) -> bool
fn eq(&self, other: &TokenStream) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<Rc<SourceFile, Global>> for TokenStream
impl TryFrom<Rc<SourceFile, Global>> for TokenStream
impl StructuralPartialEq for TokenStream
Auto Trait Implementations§
impl RefUnwindSafe for TokenStream
impl !Send for TokenStream
impl !Sync for TokenStream
impl Unpin for TokenStream
impl UnwindSafe for TokenStream
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