pub enum BackpressureStrategy {
Block,
DropOldest,
DropNewest,
Throttle {
high_watermark: usize,
low_watermark: usize,
backoff: Duration,
},
}Expand description
Backpressure strategy for handling overload
Variants§
Block
Block when buffer is full
DropOldest
Drop oldest items when buffer is full
DropNewest
Drop newest items when buffer is full
Throttle
Apply backpressure with custom threshold
Trait Implementations§
Source§impl Clone for BackpressureStrategy
impl Clone for BackpressureStrategy
Source§fn clone(&self) -> BackpressureStrategy
fn clone(&self) -> BackpressureStrategy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BackpressureStrategy
impl RefUnwindSafe for BackpressureStrategy
impl Send for BackpressureStrategy
impl Sync for BackpressureStrategy
impl Unpin for BackpressureStrategy
impl UnwindSafe for BackpressureStrategy
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