Struct capnp::message::HeapAllocator [−][src]
Standard segment allocator. Allocates each segment via alloc::alloc::alloc_zeroed()
.
Implementations
impl HeapAllocator
[src]
pub fn new() -> HeapAllocator
[src]
pub fn first_segment_words(self, value: u32) -> HeapAllocator
[src]
Sets the size of the initial segment in words, where 1 word = 8 bytes.
pub fn allocation_strategy(self, value: AllocationStrategy) -> HeapAllocator
[src]
Sets the allocation strategy for segments after the first one.
Trait Implementations
impl Allocator for HeapAllocator
[src]
fn allocate_segment(&mut self, minimum_size: u32) -> (*mut u8, u32)
[src]
fn deallocate_segment(&mut self, ptr: *mut u8, word_size: u32, _words_used: u32)
[src]
impl Debug for HeapAllocator
[src]
Auto Trait Implementations
impl RefUnwindSafe for HeapAllocator
impl Send for HeapAllocator
impl Sync for HeapAllocator
impl Unpin for HeapAllocator
impl UnwindSafe for HeapAllocator
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,