pub struct AllocationCollection { /* private fields */ }
Expand description
Collection of allocation adapters for batch operations
Implementations§
Source§impl AllocationCollection
impl AllocationCollection
Sourcepub fn from_allocation_infos(infos: Vec<AllocationInfo>) -> Self
pub fn from_allocation_infos(infos: Vec<AllocationInfo>) -> Self
Create a collection from a vector of AllocationInfo
Sourcepub fn from_optimized_infos(infos: Vec<OptimizedAllocationInfo>) -> Self
pub fn from_optimized_infos(infos: Vec<OptimizedAllocationInfo>) -> Self
Create a collection from a vector of OptimizedAllocationInfo
Sourcepub fn push(&mut self, allocation: AllocationInfoAdapter)
pub fn push(&mut self, allocation: AllocationInfoAdapter)
Add an allocation to the collection
Sourcepub fn iter(&self) -> Iter<'_, AllocationInfoAdapter>
pub fn iter(&self) -> Iter<'_, AllocationInfoAdapter>
Get an iterator over the allocations
Sourcepub fn iter_mut(&mut self) -> IterMut<'_, AllocationInfoAdapter>
pub fn iter_mut(&mut self) -> IterMut<'_, AllocationInfoAdapter>
Get a mutable iterator over the allocations
Sourcepub fn to_allocation_infos(&self) -> Vec<AllocationInfo>
pub fn to_allocation_infos(&self) -> Vec<AllocationInfo>
Convert to a vector of AllocationInfo (for compatibility)
Sourcepub fn to_optimized_infos(&self) -> Vec<OptimizedAllocationInfo>
pub fn to_optimized_infos(&self) -> Vec<OptimizedAllocationInfo>
Convert to a vector of OptimizedAllocationInfo (for performance)
Sourcepub fn memory_stats(&self) -> CollectionMemoryStats
pub fn memory_stats(&self) -> CollectionMemoryStats
Get memory usage statistics for the collection
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AllocationCollection
impl RefUnwindSafe for AllocationCollection
impl Send for AllocationCollection
impl Sync for AllocationCollection
impl Unpin for AllocationCollection
impl UnwindSafe for AllocationCollection
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more