pub struct BatchDemand {
pub max_rows: usize,
pub max_bytes: usize,
}Expand description
Maximum work a consumer is prepared to accept from one pull.
Fields§
§max_rows: usizeMaximum logical rows accepted in the next batch.
max_bytes: usizeMaximum retained bytes accepted in the next batch.
Implementations§
Source§impl BatchDemand
impl BatchDemand
Sourcepub const fn new(max_rows: usize, max_bytes: usize) -> Self
pub const fn new(max_rows: usize, max_bytes: usize) -> Self
Creates an explicit demand. Zero in either dimension means no work can currently be accepted and producers should report backpressure.
Sourcepub const fn can_accept_work(self) -> bool
pub const fn can_accept_work(self) -> bool
Reports whether the consumer currently has capacity for work.
Trait Implementations§
Source§impl Clone for BatchDemand
impl Clone for BatchDemand
impl Copy for BatchDemand
Source§impl Debug for BatchDemand
impl Debug for BatchDemand
impl Eq for BatchDemand
Source§impl PartialEq for BatchDemand
impl PartialEq for BatchDemand
impl StructuralPartialEq for BatchDemand
Auto Trait Implementations§
impl Freeze for BatchDemand
impl RefUnwindSafe for BatchDemand
impl Send for BatchDemand
impl Sync for BatchDemand
impl Unpin for BatchDemand
impl UnsafeUnpin for BatchDemand
impl UnwindSafe for BatchDemand
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more