pub struct Demand(/* private fields */);Implementations§
Source§impl Demand
impl Demand
pub const ZERO: Self
pub const ONE: Self
pub const MAX: Self
pub const fn new(available: u64) -> Self
pub const fn available(self) -> u64
pub const fn is_unbounded(self) -> bool
pub const fn is_empty(self) -> bool
pub const fn saturating_add(self, rhs: Self) -> Self
pub fn consume_one(&mut self) -> bool
Trait Implementations§
impl Copy for Demand
impl Eq for Demand
Source§impl Ord for Demand
impl Ord for Demand
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 PartialOrd for Demand
impl PartialOrd for Demand
impl StructuralPartialEq for Demand
Auto Trait Implementations§
impl Freeze for Demand
impl RefUnwindSafe for Demand
impl Send for Demand
impl Sync for Demand
impl Unpin for Demand
impl UnsafeUnpin for Demand
impl UnwindSafe for Demand
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> JobKey for T
Source§impl<T> Message for T
impl<T> Message for T
Source§fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
Convert a BoxedMessage to this concrete type
Source§fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
Convert this message to a BoxedMessage