pub struct Config { /* private fields */ }Expand description
Consumer configuration.
Implementations§
Source§impl Config
impl Config
Sourcepub const fn new(user_capacity: usize) -> Self
pub const fn new(user_capacity: usize) -> Self
A config with the given bounded user-lane capacity and no aging.
The capacity is a MINIMUM: the ring rounds it up to a power of two (floor 2), and the rounded size is the effective capacity.
Sourcepub const fn with_aging_cap(self, k: usize) -> Self
pub const fn with_aging_cap(self, k: usize) -> Self
Force one waiting user through after k consecutive control dequeues.
0 disables aging.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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