pub struct AllocBuilder<'a, Backend, Layout, Policy = JustAlloc> { /* private fields */ }Implementations§
Source§impl<'a, Backend, Layout, Policy> AllocBuilder<'a, Backend, Layout, Policy>
impl<'a, Backend, Layout, Policy> AllocBuilder<'a, Backend, Layout, Policy>
Sourcepub fn with_policy<OtherPolicy: SafePolicy + ConstPolicy>(
self,
) -> AllocBuilder<'a, Backend, Layout, OtherPolicy>
pub fn with_policy<OtherPolicy: SafePolicy + ConstPolicy>( self, ) -> AllocBuilder<'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,
) -> AllocBuilder<'a, Backend, Layout, OtherPolicy>
pub unsafe fn with_unsafe_policy<OtherPolicy: ConstPolicy>( self, ) -> AllocBuilder<'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,
) -> AllocBuilder<'a, Backend, Layout, OtherPolicy>
pub unsafe fn with_runtime_policy<OtherPolicy>( self, policy: OtherPolicy, ) -> AllocBuilder<'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.
Source§impl<'a, Backend: ShmProviderBackend, Layout: TryInto<MemoryLayout>> AllocBuilder<'a, Backend, Layout>
impl<'a, Backend: ShmProviderBackend, Layout: TryInto<MemoryLayout>> AllocBuilder<'a, Backend, Layout>
Sourcepub fn into_layout(
self,
) -> Result<PrecomputedLayout<'a, Backend, Layout>, ZLayoutError>
👎Deprecated since 1.5.3: Please use ShmProvider::alloc_layout method instead
pub fn into_layout( self, ) -> Result<PrecomputedLayout<'a, Backend, Layout>, ZLayoutError>
ShmProvider::alloc_layout method insteadTry to build an allocation layout
This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
Trait Implementations§
Source§impl<'a, Backend: ShmProviderBackend + Sync, Layout: AllocLayout + Send + Sync + 'a, Policy: AsyncAllocPolicy<Backend> + Sync + 'a> IntoFuture for AllocBuilder<'a, Backend, Layout, Policy>
impl<'a, Backend: ShmProviderBackend + Sync, Layout: AllocLayout + Send + Sync + 'a, Policy: AsyncAllocPolicy<Backend> + Sync + 'a> IntoFuture for AllocBuilder<'a, Backend, Layout, Policy>
Source§type Output = <AllocBuilder<'a, Backend, Layout, Policy> as Resolvable>::To
type Output = <AllocBuilder<'a, Backend, Layout, Policy> as Resolvable>::To
The output that the future will produce on completion.
Source§type IntoFuture = Pin<Box<dyn Future<Output = <AllocBuilder<'a, Backend, Layout, Policy> as IntoFuture>::Output> + Send + 'a>>
type IntoFuture = Pin<Box<dyn Future<Output = <AllocBuilder<'a, Backend, Layout, Policy> as IntoFuture>::Output> + Send + 'a>>
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 AllocBuilder<'_, Backend, Layout, Policy>
impl<Backend, Layout: AllocLayout, Policy> Resolvable for AllocBuilder<'_, Backend, Layout, Policy>
type To = Result<<Layout as AllocLayout>::Buffer, ZLayoutAllocError>
Source§impl<Backend: ShmProviderBackend, Layout: AllocLayout, Policy: AllocPolicy<Backend>> Wait for AllocBuilder<'_, Backend, Layout, Policy>
impl<Backend: ShmProviderBackend, Layout: AllocLayout, Policy: AllocPolicy<Backend>> Wait for AllocBuilder<'_, 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<'a, Backend, Layout, Policy> Freeze for AllocBuilder<'a, Backend, Layout, Policy>
impl<'a, Backend, Layout, Policy> RefUnwindSafe for AllocBuilder<'a, Backend, Layout, Policy>
impl<'a, Backend, Layout, Policy> Send for AllocBuilder<'a, Backend, Layout, Policy>
impl<'a, Backend, Layout, Policy> Sync for AllocBuilder<'a, Backend, Layout, Policy>
impl<'a, Backend, Layout, Policy> Unpin for AllocBuilder<'a, Backend, Layout, Policy>
impl<'a, Backend, Layout, Policy> UnwindSafe for AllocBuilder<'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