Struct Arena
pub struct Arena(Bump);Available on crate feature
parse only.Expand description
Memory for the lists, nested types and doc comments of parsed interfaces.
A parsed Interface borrows from the arena it was
parsed into. The memory is freed when the arena is dropped.
use varlet_idl::{Arena, Interface};
let arena = Arena::new();
let interface = Interface::parse("interface a.b\ntype T (a: []int)", &arena)?;
assert_eq!(interface.members().len(), 1);Tuple Fields§
§0: BumpImplementations§
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Arena
impl !RefUnwindSafe for Arena
impl !Sync for Arena
impl !UnwindSafe for Arena
impl Send for Arena
impl Unpin for Arena
impl UnsafeUnpin 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