pub struct MailboxCapacity(/* private fields */);Expand description
Logical hop bound for one flow’s inbox.
§Why not usize
A raw capacity: usize lets a 64-bit host pass an absurd value and
pretend it is a memory contract. An embeddable M:N runtime must pick
deliberate bounds: enough hops for request/reply bursts, not enough to
grow RSS until OOM when a slow consumer sits under a fast producer.
MIN = 1 (a mailbox that cannot hold a hop is not a mailbox).
MAX = 1 << 20 (~1M hops) is a hard ceiling, not a recommendation —
the default is MailboxCapacity::DEFAULT (256).
Implementations§
Trait Implementations§
Source§impl Clone for MailboxCapacity
impl Clone for MailboxCapacity
Source§fn clone(&self) -> MailboxCapacity
fn clone(&self) -> MailboxCapacity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MailboxCapacity
Source§impl Debug for MailboxCapacity
impl Debug for MailboxCapacity
Source§impl Default for MailboxCapacity
impl Default for MailboxCapacity
impl Eq for MailboxCapacity
Source§impl Hash for MailboxCapacity
impl Hash for MailboxCapacity
Source§impl Ord for MailboxCapacity
impl Ord for MailboxCapacity
Source§fn cmp(&self, other: &MailboxCapacity) -> Ordering
fn cmp(&self, other: &MailboxCapacity) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MailboxCapacity
impl PartialEq for MailboxCapacity
Source§impl PartialOrd for MailboxCapacity
impl PartialOrd for MailboxCapacity
impl StructuralPartialEq for MailboxCapacity
Auto Trait Implementations§
impl Freeze for MailboxCapacity
impl RefUnwindSafe for MailboxCapacity
impl Send for MailboxCapacity
impl Sync for MailboxCapacity
impl Unpin for MailboxCapacity
impl UnsafeUnpin for MailboxCapacity
impl UnwindSafe for MailboxCapacity
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