pub struct RawOpaquePoolBuilder { /* private fields */ }Expand description
Creates an instance of RawOpaquePool.
Implementations§
Source§impl RawOpaquePoolBuilder
impl RawOpaquePoolBuilder
Sourcepub fn layout(self, layout: Layout) -> Self
pub fn layout(self, layout: Layout) -> Self
Defines the layout that all objects inserted into the pool must match. Mandatory.
The layout must have a nonzero size.
Sourcepub fn layout_of<T: Sized>(self) -> Self
pub fn layout_of<T: Sized>(self) -> Self
Defines the layout that all objects inserted into the pool must match. Mandatory.
The layout must have a nonzero size.
Sourcepub fn drop_policy(self, drop_policy: DropPolicy) -> Self
pub fn drop_policy(self, drop_policy: DropPolicy) -> Self
Defines the drop policy for the pool. Optional.
Sourcepub fn build(self) -> RawOpaquePool
pub fn build(self) -> RawOpaquePool
Validates the options and creates the pool.
§Panics
Panics if the layout is not set or if it is a zero-sized layout.
Trait Implementations§
Source§impl Debug for RawOpaquePoolBuilder
impl Debug for RawOpaquePoolBuilder
Source§impl Default for RawOpaquePoolBuilder
impl Default for RawOpaquePoolBuilder
Source§fn default() -> RawOpaquePoolBuilder
fn default() -> RawOpaquePoolBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RawOpaquePoolBuilder
impl RefUnwindSafe for RawOpaquePoolBuilder
impl !Send for RawOpaquePoolBuilder
impl !Sync for RawOpaquePoolBuilder
impl Unpin for RawOpaquePoolBuilder
impl UnwindSafe for RawOpaquePoolBuilder
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