pub struct TokenParser {
pub current: Option<TokenTree>,
/* private fields */
}Fields§
§current: Option<TokenTree>Implementations§
Source§impl TokenParser
impl TokenParser
pub fn new(start: TokenStream) -> Self
pub fn advance(&mut self)
pub fn unexpected(&self) -> TokenStream
pub fn is_delim(&mut self, delim: Delimiter) -> bool
pub fn is_brace(&mut self) -> bool
pub fn is_paren(&mut self) -> bool
pub fn is_bracket(&mut self) -> bool
pub fn open_delim(&mut self, delim: Delimiter) -> bool
pub fn is_group_with_delim(&mut self, delim: Delimiter) -> bool
pub fn open_group(&mut self) -> Option<Delimiter>
pub fn open_brace(&mut self) -> bool
pub fn open_paren(&mut self) -> bool
pub fn open_bracket(&mut self) -> bool
pub fn is_eot(&mut self) -> bool
pub fn eat_eot(&mut self) -> bool
pub fn eat_level(&mut self) -> TokenStream
pub fn eat_level_or_punct(&mut self, what: char) -> TokenStream
pub fn eat_ident(&mut self, what: &str) -> bool
pub fn is_literal(&mut self) -> bool
pub fn eat_literal(&mut self) -> Option<Literal>
pub fn span(&self) -> Option<Span>
pub fn is_punct_alone(&mut self, what: char) -> bool
pub fn is_punct_any(&mut self, what: char) -> bool
pub fn eat_double_colon_destruct(&mut self) -> bool
pub fn eat_sep(&mut self) -> bool
pub fn eat_punct_alone(&mut self, what: char) -> bool
pub fn eat_punct_any(&mut self, what: char) -> bool
pub fn eat_any_punct(&mut self) -> Option<String>
pub fn eat_any_ident(&mut self) -> Option<String>
pub fn eat_any_ident_with_span(&mut self) -> Option<(String, Span)>
pub fn expect_any_ident(&mut self) -> Result<String, TokenStream>
pub fn expect_punct_alone(&mut self, what: char) -> Result<(), TokenStream>
pub fn expect_punct_any(&mut self, what: char) -> Result<(), TokenStream>
pub fn eat_ident_path(&mut self) -> Option<TokenStream>
pub fn eat_where_clause( &mut self, add_where: Option<&str>, ) -> Option<TokenStream>
pub fn eat_struct_field(&mut self) -> Option<StructField>
pub fn eat_attributes(&mut self) -> Vec<Attribute>
pub fn eat_all_struct_fields(&mut self) -> Option<Vec<StructField>>
pub fn eat_generic(&mut self) -> Option<TokenStream>
pub fn eat_all_types(&mut self) -> Option<Vec<TokenStream>>
pub fn eat_type(&mut self) -> Option<TokenStream>
Auto Trait Implementations§
impl !Send for TokenParser
impl !Sync for TokenParser
impl Freeze for TokenParser
impl RefUnwindSafe for TokenParser
impl Unpin for TokenParser
impl UnsafeUnpin for TokenParser
impl UnwindSafe for TokenParser
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