Struct wast::parser::ParseBuffer
source · [−]pub struct ParseBuffer<'a> { /* private fields */ }
Expand description
A low-level buffer of tokens which represents a completely lexed file.
A ParseBuffer
will immediately lex an entire file and then store all
tokens internally. A ParseBuffer
only used to pass to the top-level
parse
function.
Implementations
sourceimpl ParseBuffer<'_>
impl ParseBuffer<'_>
sourcepub fn new(input: &str) -> Result<ParseBuffer<'_>>
pub fn new(input: &str) -> Result<ParseBuffer<'_>>
Creates a new ParseBuffer
by lexing the given input
completely.
Errors
Returns an error if input
fails to lex.
sourcepub fn new_with_lexer(lexer: Lexer<'_>) -> Result<ParseBuffer<'_>>
pub fn new_with_lexer(lexer: Lexer<'_>) -> Result<ParseBuffer<'_>>
Creates a new ParseBuffer
by lexing the given input
completely.
Errors
Returns an error if input
fails to lex.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for ParseBuffer<'a>
impl<'a> Send for ParseBuffer<'a>
impl<'a> !Sync for ParseBuffer<'a>
impl<'a> Unpin for ParseBuffer<'a>
impl<'a> UnwindSafe for ParseBuffer<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more