pub struct BlindPoolBuilder { /* private fields */ }Expand description
Builder for creating an instance of BlindPool.
This builder allows configuration of pool behavior before creation.
§Examples
use blind_pool::{BlindPool, DropPolicy};
// Default blind pool.
let pool = BlindPool::builder().build();
// With custom drop policy.
let pool = BlindPool::builder()
.drop_policy(DropPolicy::MustNotDropItems)
.build();Implementations§
Source§impl BlindPoolBuilder
impl BlindPoolBuilder
Sourcepub fn drop_policy(self, policy: DropPolicy) -> Self
pub fn drop_policy(self, policy: DropPolicy) -> Self
Sets the drop policy for the pool. This governs how to treat remaining items in the pool when the pool is dropped.
§Examples
use blind_pool::{BlindPool, DropPolicy};
let pool = BlindPool::builder()
.drop_policy(DropPolicy::MustNotDropItems)
.build();Trait Implementations§
Auto Trait Implementations§
impl Freeze for BlindPoolBuilder
impl RefUnwindSafe for BlindPoolBuilder
impl Send for BlindPoolBuilder
impl Sync for BlindPoolBuilder
impl Unpin for BlindPoolBuilder
impl UnwindSafe for BlindPoolBuilder
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