Struct capnp::private::arena::BuilderArenaImpl
source · pub struct BuilderArenaImpl<A>where
A: Allocator,{ /* private fields */ }
Implementations§
source§impl<A> BuilderArenaImpl<A>where
A: Allocator,
impl<A> BuilderArenaImpl<A>where
A: Allocator,
pub fn new(allocator: A) -> Self
sourcepub fn allocate_segment(&mut self, minimum_size: u32) -> Result<()>
pub fn allocate_segment(&mut self, minimum_size: u32) -> Result<()>
Allocates a new segment with capacity for at least minimum_size
words.
pub fn get_segments_for_output(&self) -> OutputSegments<'_>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
sourcepub fn into_allocator(self) -> A
pub fn into_allocator(self) -> A
Retrieves the underlying Allocator
, deallocating all currently-allocated
segments.
Trait Implementations§
source§impl<A> BuilderArena for BuilderArenaImpl<A>where
A: Allocator,
impl<A> BuilderArena for BuilderArenaImpl<A>where
A: Allocator,
source§impl<A> ReaderArena for BuilderArenaImpl<A>where
A: Allocator,
impl<A> ReaderArena for BuilderArenaImpl<A>where
A: Allocator,
fn get_segment(&self, id: u32) -> Result<(*const u8, u32)>
unsafe fn check_offset( &self, _segment_id: u32, start: *const u8, offset_in_words: i32 ) -> Result<*const u8>
fn contains_interval( &self, _id: u32, _start: *const u8, _size: usize ) -> Result<()>
fn amplified_read(&self, _virtual_amount: u64) -> Result<()>
fn nesting_limit(&self) -> i32
Auto Trait Implementations§
impl<A> Freeze for BuilderArenaImpl<A>where
A: Freeze,
impl<A> RefUnwindSafe for BuilderArenaImpl<A>where
A: RefUnwindSafe,
impl<A> !Send for BuilderArenaImpl<A>
impl<A> !Sync for BuilderArenaImpl<A>
impl<A> Unpin for BuilderArenaImpl<A>where
A: Unpin,
impl<A> UnwindSafe for BuilderArenaImpl<A>where
A: UnwindSafe,
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