pub struct PrecomputedAllocBuilder<'b, 'a: 'b, Backend, Layout, Policy = JustAlloc> { /* private fields */ }Expand description
Builder for making allocations with instant layout calculation
This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
Implementations§
Source§impl<'b, 'a: 'b, Backend, Layout, Policy> PrecomputedAllocBuilder<'b, 'a, Backend, Layout, Policy>
impl<'b, 'a: 'b, Backend, Layout, Policy> PrecomputedAllocBuilder<'b, 'a, Backend, Layout, Policy>
Sourcepub fn with_policy<OtherPolicy: ConstPolicy>(
self,
) -> PrecomputedAllocBuilder<'b, 'a, Backend, Layout, OtherPolicy>
pub fn with_policy<OtherPolicy: ConstPolicy>( self, ) -> PrecomputedAllocBuilder<'b, 'a, Backend, Layout, OtherPolicy>
Set the allocation policy
This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
Sourcepub unsafe fn with_unsafe_policy<OtherPolicy: ConstPolicy>(
self,
) -> PrecomputedAllocBuilder<'b, 'a, Backend, Layout, OtherPolicy>
pub unsafe fn with_unsafe_policy<OtherPolicy: ConstPolicy>( self, ) -> PrecomputedAllocBuilder<'b, 'a, Backend, Layout, OtherPolicy>
Set the unsafe allocation policy
This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
§Safety
The user must ensure its use of allocated buffers are safe taking into account the policy.
Sourcepub unsafe fn with_runtime_policy<OtherPolicy>(
self,
policy: OtherPolicy,
) -> PrecomputedAllocBuilder<'b, 'a, Backend, Layout, OtherPolicy>
pub unsafe fn with_runtime_policy<OtherPolicy>( self, policy: OtherPolicy, ) -> PrecomputedAllocBuilder<'b, 'a, Backend, Layout, OtherPolicy>
Set the unsafe allocation policy at runtime
This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
§Safety
The user must ensure its use of allocated buffers are safe taking into account the policy.
Trait Implementations§
Source§impl<'b, 'a: 'b, Backend: ShmProviderBackend + Sync, Layout: AllocLayout + Sync, Policy: AsyncAllocPolicy<Backend> + Sync + 'b> IntoFuture for PrecomputedAllocBuilder<'b, 'a, Backend, Layout, Policy>
impl<'b, 'a: 'b, Backend: ShmProviderBackend + Sync, Layout: AllocLayout + Sync, Policy: AsyncAllocPolicy<Backend> + Sync + 'b> IntoFuture for PrecomputedAllocBuilder<'b, 'a, Backend, Layout, Policy>
Source§type Output = <PrecomputedAllocBuilder<'b, 'a, Backend, Layout, Policy> as Resolvable>::To
type Output = <PrecomputedAllocBuilder<'b, 'a, Backend, Layout, Policy> as Resolvable>::To
The output that the future will produce on completion.
Source§type IntoFuture = Pin<Box<dyn Future<Output = <PrecomputedAllocBuilder<'b, 'a, Backend, Layout, Policy> as IntoFuture>::Output> + Send + 'b>>
type IntoFuture = Pin<Box<dyn Future<Output = <PrecomputedAllocBuilder<'b, 'a, Backend, Layout, Policy> as IntoFuture>::Output> + Send + 'b>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Source§impl<Backend, Layout: AllocLayout, Policy> Resolvable for PrecomputedAllocBuilder<'_, '_, Backend, Layout, Policy>
impl<Backend, Layout: AllocLayout, Policy> Resolvable for PrecomputedAllocBuilder<'_, '_, Backend, Layout, Policy>
type To = Result<<Layout as AllocLayout>::Buffer, ZAllocError>
Source§impl<Backend: ShmProviderBackend, Layout: AllocLayout, Policy: AllocPolicy<Backend>> Wait for PrecomputedAllocBuilder<'_, '_, Backend, Layout, Policy>
impl<Backend: ShmProviderBackend, Layout: AllocLayout, Policy: AllocPolicy<Backend>> Wait for PrecomputedAllocBuilder<'_, '_, Backend, Layout, Policy>
Source§fn wait(self) -> <Self as Resolvable>::To
fn wait(self) -> <Self as Resolvable>::To
Synchronously execute and wait
Auto Trait Implementations§
impl<'b, 'a, Backend, Layout, Policy> Freeze for PrecomputedAllocBuilder<'b, 'a, Backend, Layout, Policy>where
Policy: Freeze,
impl<'b, 'a, Backend, Layout, Policy> RefUnwindSafe for PrecomputedAllocBuilder<'b, 'a, Backend, Layout, Policy>
impl<'b, 'a, Backend, Layout, Policy> Send for PrecomputedAllocBuilder<'b, 'a, Backend, Layout, Policy>
impl<'b, 'a, Backend, Layout, Policy> Sync for PrecomputedAllocBuilder<'b, 'a, Backend, Layout, Policy>
impl<'b, 'a, Backend, Layout, Policy> Unpin for PrecomputedAllocBuilder<'b, 'a, Backend, Layout, Policy>where
Policy: Unpin,
impl<'b, 'a, Backend, Layout, Policy> UnwindSafe for PrecomputedAllocBuilder<'b, 'a, Backend, Layout, Policy>
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