pub struct Threshold {
pub threshold_bytes: usize,
pub head_reserve_bytes: usize,
/* private fields */
}Expand description
A threshold-based SpillPolicy: when a queue’s resident-byte count
exceeds head_reserve_bytes + threshold_bytes, spill all entries past
the head reserve (except the last entry, which stays as the try_merge
target).
Fields§
§threshold_bytes: usizeSpillable surplus: spill is considered when resident bytes exceed
head_reserve_bytes + threshold_bytes.
head_reserve_bytes: usizeBytes near the head of the queue stay resident, protecting the consumer from an immediate page-in stall.
Implementations§
Trait Implementations§
Source§impl SpillPolicy for Threshold
impl SpillPolicy for Threshold
Auto Trait Implementations§
impl Freeze for Threshold
impl !RefUnwindSafe for Threshold
impl Send for Threshold
impl !Sync for Threshold
impl Unpin for Threshold
impl UnsafeUnpin for Threshold
impl !UnwindSafe for Threshold
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> 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