pub struct BlockOn<InnerPolicy = JustAlloc> { /* private fields */ }Expand description
Blocking allocation policy.
This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
This policy will block until the allocation succeeds.
Both sync and async modes available.Implementations§
Trait Implementations§
Source§impl<Backend, InnerPolicy> AllocPolicy<Backend> for BlockOn<InnerPolicy>where
Backend: ShmProviderBackend,
InnerPolicy: AllocPolicy<Backend>,
impl<Backend, InnerPolicy> AllocPolicy<Backend> for BlockOn<InnerPolicy>where
Backend: ShmProviderBackend,
InnerPolicy: AllocPolicy<Backend>,
fn alloc( &self, layout: &MemoryLayout, provider: &ShmProvider<Backend>, ) -> ChunkAllocResult
Source§impl<Backend, InnerPolicy> AsyncAllocPolicy<Backend> for BlockOn<InnerPolicy>
impl<Backend, InnerPolicy> AsyncAllocPolicy<Backend> for BlockOn<InnerPolicy>
fn alloc_async<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
layout: &'life1 MemoryLayout,
provider: &'life2 ShmProvider<Backend>,
) -> Pin<Box<dyn Future<Output = ChunkAllocResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§impl<InnerPolicy: ConstPolicy> ConstPolicy for BlockOn<InnerPolicy>
impl<InnerPolicy: ConstPolicy> ConstPolicy for BlockOn<InnerPolicy>
impl<InnerPolicy: Copy> Copy for BlockOn<InnerPolicy>
impl<InnerPolicy: SafePolicy> SafePolicy for BlockOn<InnerPolicy>
Auto Trait Implementations§
impl<InnerPolicy> Freeze for BlockOn<InnerPolicy>where
InnerPolicy: Freeze,
impl<InnerPolicy> RefUnwindSafe for BlockOn<InnerPolicy>where
InnerPolicy: RefUnwindSafe,
impl<InnerPolicy> Send for BlockOn<InnerPolicy>where
InnerPolicy: Send,
impl<InnerPolicy> Sync for BlockOn<InnerPolicy>where
InnerPolicy: Sync,
impl<InnerPolicy> Unpin for BlockOn<InnerPolicy>where
InnerPolicy: Unpin,
impl<InnerPolicy> UnwindSafe for BlockOn<InnerPolicy>where
InnerPolicy: 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