pub struct Arena { /* private fields */ }Expand description
Bump allocator backing all data structures produced by the parser.
Create an Arena before calling parse and pass it by
reference. The arena must outlive the returned Root
because parsed values borrow from it.
All memory is freed when the arena is dropped.
§Examples
let arena = toml_spanner::Arena::new();
let table = toml_spanner::parse("key = \"value\"", &arena)?;
// `table` borrows from both the input string and `arena`.Implementations§
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 UnsafeUnpin 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