#[non_exhaustive]pub enum OverflowStrategy {
Backpressure,
DropHead,
DropNew,
DropTail,
DropBuffer,
Fail,
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Backpressure
Propagate backpressure by awaiting channel capacity.
DropHead
Drop the oldest buffered element to make room.
DropNew
Drop the newest produced element (the one that would overflow).
DropTail
Drop the newest buffered element.
DropBuffer
Drop every buffered element when overflow happens.
Fail
Fail the stream on overflow.
Trait Implementations§
Source§impl Clone for OverflowStrategy
impl Clone for OverflowStrategy
Source§fn clone(&self) -> OverflowStrategy
fn clone(&self) -> OverflowStrategy
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 moreSource§impl Debug for OverflowStrategy
impl Debug for OverflowStrategy
Source§impl PartialEq for OverflowStrategy
impl PartialEq for OverflowStrategy
Source§fn eq(&self, other: &OverflowStrategy) -> bool
fn eq(&self, other: &OverflowStrategy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for OverflowStrategy
impl Eq for OverflowStrategy
impl StructuralPartialEq for OverflowStrategy
Auto Trait Implementations§
impl Freeze for OverflowStrategy
impl RefUnwindSafe for OverflowStrategy
impl Send for OverflowStrategy
impl Sync for OverflowStrategy
impl Unpin for OverflowStrategy
impl UnsafeUnpin for OverflowStrategy
impl UnwindSafe for OverflowStrategy
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