pub struct Arena { /* private fields */ }Expand description
A bump allocator used by the parser to store escaped strings.
Create an Arena before calling parse and pass it by
reference. The arena must live at least as long as the parsed Table
because Str values may 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