Struct macros_utils::MacroStream
source · pub struct MacroStream { /* private fields */ }
Implementations§
source§impl MacroStream
impl MacroStream
pub fn new() -> Self
pub fn popped(&self) -> usize
pub fn from_tokens(stream: TokenStream) -> ParseResult<Self>
pub fn pop(&mut self) -> Option<Token>
pub fn peek(&self) -> Option<&Token>
pub fn parse<T>(&mut self) -> Result<T, MacrosError>where T: Parse,
pub fn is_empty(&self) -> bool
pub fn pop_or_err(&mut self) -> Result<Token, ParseError>
pub fn peek_or_err(&self) -> Result<&Token, ParseError>
pub fn push_front(&mut self, token: Token)
pub fn push_back(&mut self, token: Token)
pub fn len(&self) -> usize
pub fn fork(&self) -> Self
pub fn popped_off_fork(&mut self, p: usize) -> Self
pub fn popped_off(&mut self, p: usize)
Trait Implementations§
source§impl Clone for MacroStream
impl Clone for MacroStream
source§fn clone(&self) -> MacroStream
fn clone(&self) -> MacroStream
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 MacroStream
impl Debug for MacroStream
source§impl Default for MacroStream
impl Default for MacroStream
source§impl From<TokenStream> for MacroStream
impl From<TokenStream> for MacroStream
source§fn from(stream: TokenStream) -> Self
fn from(stream: TokenStream) -> Self
Converts to this type from the input type.
source§impl PartialEq<MacroStream> for MacroStream
impl PartialEq<MacroStream> for MacroStream
source§fn eq(&self, other: &MacroStream) -> bool
fn eq(&self, other: &MacroStream) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.