Skip to main content

ContextExt

Trait ContextExt 

Source
pub trait ContextExt {
    // Required methods
    fn current(&self) -> Option<u32>;
    fn peek(&self, arena: &AstArena) -> Option<u32>;
    fn next_token(&self, arena: &AstArena) -> Option<u32>;
    fn done(&self, arena: &AstArena) -> bool;
    fn end(&self);
    fn update(&self, token: Option<u32>);
    fn slice(&self) -> Context;
    fn tokens(&self) -> Vec<u32>;
    fn index(&self) -> isize;
}
Expand description

context helpers on the shared handle

Required Methods§

Source

fn current(&self) -> Option<u32>

Source

fn peek(&self, arena: &AstArena) -> Option<u32>

Source

fn next_token(&self, arena: &AstArena) -> Option<u32>

Source

fn done(&self, arena: &AstArena) -> bool

Source

fn end(&self)

Source

fn update(&self, token: Option<u32>)

Source

fn slice(&self) -> Context

Source

fn tokens(&self) -> Vec<u32>

Source

fn index(&self) -> isize

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§