pub enum Backpressure {
DropNewest,
DropOldest,
FailProducer,
Sample(u32),
}Expand description
Backpressure strategy.
Variants§
DropNewest
Drop newest events when buffer is full.
DropOldest
Drop oldest events when buffer is full (default).
FailProducer
Fail the producer when buffer is full.
Sample(u32)
Sample events at the given rate (1 in N). Requires runtime support.
Trait Implementations§
Source§impl Clone for Backpressure
impl Clone for Backpressure
Source§fn clone(&self) -> Backpressure
fn clone(&self) -> Backpressure
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 Backpressure
Source§impl Debug for Backpressure
impl Debug for Backpressure
Source§impl From<Backpressure> for BackpressureMode
impl From<Backpressure> for BackpressureMode
Source§fn from(bp: Backpressure) -> Self
fn from(bp: Backpressure) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Backpressure
impl RefUnwindSafe for Backpressure
impl Send for Backpressure
impl Sync for Backpressure
impl Unpin for Backpressure
impl UnsafeUnpin for Backpressure
impl UnwindSafe for Backpressure
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