pub struct RecommendedCapacity(/* private fields */);Expand description
A capacity for a stream whose payload size the caller has not measured.
Exists so EventRing::new can take a NonZeroUsize — a zero-capacity ring
would accept a push and drop it immediately, which is a livelock dressed up
as a buffer — without forcing every construction site to reach for
NonZeroUsize::new. A caller that knows its own bound should pass one
directly; this is the one to use when it does not.
Implementations§
Trait Implementations§
Source§impl Clone for RecommendedCapacity
impl Clone for RecommendedCapacity
impl Copy for RecommendedCapacity
Source§impl Debug for RecommendedCapacity
impl Debug for RecommendedCapacity
impl Eq for RecommendedCapacity
Source§impl From<RecommendedCapacity> for NonZeroUsize
impl From<RecommendedCapacity> for NonZeroUsize
Source§fn from(value: RecommendedCapacity) -> Self
fn from(value: RecommendedCapacity) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RecommendedCapacity
impl PartialEq for RecommendedCapacity
impl StructuralPartialEq for RecommendedCapacity
Auto Trait Implementations§
impl Freeze for RecommendedCapacity
impl RefUnwindSafe for RecommendedCapacity
impl Send for RecommendedCapacity
impl Sync for RecommendedCapacity
impl Unpin for RecommendedCapacity
impl UnsafeUnpin for RecommendedCapacity
impl UnwindSafe for RecommendedCapacity
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