pub trait ParseBufferExtension<'a> {
// Required method
fn get_self(&self) -> &ParseBuffer<'a>;
// Provided methods
fn parse_arg(&self) -> Result<TokenStream> { ... }
fn fork_arg(&self) -> Result<ParseBuffer<'a>> { ... }
fn is_end_of_arg(&self) -> bool { ... }
fn is_empty_group(&self) -> bool { ... }
}Required Methods§
fn get_self(&self) -> &ParseBuffer<'a>
Provided Methods§
Sourcefn parse_arg(&self) -> Result<TokenStream>
fn parse_arg(&self) -> Result<TokenStream>
Advance the buffer until we reach a comma or the end of the buffer.
Returns the consumed tokens as a TokenStream.
Sourcefn fork_arg(&self) -> Result<ParseBuffer<'a>>
fn fork_arg(&self) -> Result<ParseBuffer<'a>>
Fork the current buffer and move the original buffer to the end of the argument.
fn is_end_of_arg(&self) -> bool
Sourcefn is_empty_group(&self) -> bool
fn is_empty_group(&self) -> bool
Check if the next token is an empty group.