[−][src]Struct dynvec::region::chunks::Chunks
Reallocates new chuncks when it gets too small to allocate new objects.
Implementations
impl<H> Chunks<H>
[src]
pub fn new(min_chunk_size: usize) -> Self
[src]
Creates a new instance of Chunks
. No chunks will be allocated until
an object is allocated.
Note that chunks may need to allocate more memory than min_chunk_size
to store allocate a large number of bytes.
pub fn with_chuncks(min_chunk_size: usize, chunk_count: usize) -> Self
[src]
Creates a new instance of Chuncks
. This function allocates chunk_count
chunks in advance.
Trait Implementations
impl<H> Region<H> for Chunks<H>
[src]
type Pointers = Flatten<IntoIter<<Block<H> as Region<H>>::Pointers>>
An iterator over all the allocations of this region.
pub fn allocate(&mut self, layout: Layout, header: H) -> Result<*mut u8, H>
[src]
pub fn deallocate(&mut self, ptr: *mut u8) -> Option<H>
[src]
pub fn has_allocated(&self, ptr: *mut u8) -> bool
[src]
pub fn count(&self) -> usize
[src]
pub fn allocations(&self) -> Self::Pointers
[src]
pub fn deallocate_all(&mut self) -> DeallocateAll<'_, H, Self>ⓘNotable traits for DeallocateAll<'a, H, R>
impl<'a, H, R: Region<H>> Iterator for DeallocateAll<'a, H, R> type Item = (*mut u8, H);
where
Self: Sized,
[src]
Notable traits for DeallocateAll<'a, H, R>
impl<'a, H, R: Region<H>> Iterator for DeallocateAll<'a, H, R> type Item = (*mut u8, H);
Self: Sized,
Auto Trait Implementations
impl<H> RefUnwindSafe for Chunks<H> where
H: RefUnwindSafe,
[src]
H: RefUnwindSafe,
impl<H> !Send for Chunks<H>
[src]
impl<H> !Sync for Chunks<H>
[src]
impl<H> Unpin for Chunks<H> where
H: Unpin,
[src]
H: Unpin,
impl<H> UnwindSafe for Chunks<H> where
H: UnwindSafe,
[src]
H: UnwindSafe,
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>,