pub struct Arena { /* private fields */ }Implementations§
Source§impl Arena
impl Arena
Sourcepub fn with<F, R>(f: F) -> R
pub fn with<F, R>(f: F) -> R
Invoke the callback function with a reference to a local Arena.
The arena will be dropped when the callback returns.
pub fn alloc_token<T>(&self, value: T) -> &mut Twhere
T: Token,
pub fn alloc_context<'input, 'a, T>(&'a self, value: T) -> &'a mut Twhere
T: RuleNode<'input, 'a>,
'input: 'a,
pub fn alloc_exception<'a, T>(&'a self, value: T) -> Box<'a, T>
pub fn alloc_payload<T>(&self, value: T) -> &mut T
pub fn alloc<T>(&self, value: T) -> &mut T
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Arena
impl !RefUnwindSafe for Arena
impl Send for Arena
impl !Sync for Arena
impl Unpin for Arena
impl !UnwindSafe for Arena
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