pub struct Defragment<InnerPolicy = JustAlloc, AltPolicy = JustAlloc> { /* private fields */ }Expand description
Defragmenting policy.
This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
Try to defragment if allocation failed and allocate again if the largest defragmented chuk is not smaller than the one required
Implementations§
Source§impl<InnerPolicy, AltPolicy> Defragment<InnerPolicy, AltPolicy>
impl<InnerPolicy, AltPolicy> Defragment<InnerPolicy, AltPolicy>
Trait Implementations§
Source§impl<Backend, InnerPolicy, AltPolicy> AllocPolicy<Backend> for Defragment<InnerPolicy, AltPolicy>where
Backend: ShmProviderBackend,
InnerPolicy: AllocPolicy<Backend>,
AltPolicy: AllocPolicy<Backend>,
impl<Backend, InnerPolicy, AltPolicy> AllocPolicy<Backend> for Defragment<InnerPolicy, AltPolicy>where
Backend: ShmProviderBackend,
InnerPolicy: AllocPolicy<Backend>,
AltPolicy: AllocPolicy<Backend>,
fn alloc( &self, layout: &MemoryLayout, provider: &ShmProvider<Backend>, ) -> ChunkAllocResult
Source§impl<InnerPolicy: Clone, AltPolicy: Clone> Clone for Defragment<InnerPolicy, AltPolicy>
impl<InnerPolicy: Clone, AltPolicy: Clone> Clone for Defragment<InnerPolicy, AltPolicy>
Source§fn clone(&self) -> Defragment<InnerPolicy, AltPolicy>
fn clone(&self) -> Defragment<InnerPolicy, AltPolicy>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<InnerPolicy: ConstPolicy, AltPolicy: ConstPolicy> ConstPolicy for Defragment<InnerPolicy, AltPolicy>
impl<InnerPolicy: ConstPolicy, AltPolicy: ConstPolicy> ConstPolicy for Defragment<InnerPolicy, AltPolicy>
impl<InnerPolicy: Copy, AltPolicy: Copy> Copy for Defragment<InnerPolicy, AltPolicy>
impl<InnerPolicy: SafePolicy, AltPolicy: SafePolicy> SafePolicy for Defragment<InnerPolicy, AltPolicy>
Auto Trait Implementations§
impl<InnerPolicy, AltPolicy> Freeze for Defragment<InnerPolicy, AltPolicy>
impl<InnerPolicy, AltPolicy> RefUnwindSafe for Defragment<InnerPolicy, AltPolicy>where
InnerPolicy: RefUnwindSafe,
AltPolicy: RefUnwindSafe,
impl<InnerPolicy, AltPolicy> Send for Defragment<InnerPolicy, AltPolicy>
impl<InnerPolicy, AltPolicy> Sync for Defragment<InnerPolicy, AltPolicy>
impl<InnerPolicy, AltPolicy> Unpin for Defragment<InnerPolicy, AltPolicy>
impl<InnerPolicy, AltPolicy> UnwindSafe for Defragment<InnerPolicy, AltPolicy>where
InnerPolicy: UnwindSafe,
AltPolicy: UnwindSafe,
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
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