#[non_exhaustive]pub enum Overflow {
Reject,
DropOldest,
DropLowestPriority,
}Available on crate feature
runtime only.Expand description
What a full queue does with a new request.
#[non_exhaustive]: more policies may be added.
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.
Reject
Turn the new request away with ThrottleError::QueueFull.
DropOldest
Evict the oldest waiter to make room for the new one.
DropLowestPriority
Evict the lowest-priority waiter to make room — unless the new request is itself the lowest, in which case it is rejected.
Trait Implementations§
impl Copy for Overflow
impl Eq for Overflow
impl StructuralPartialEq for Overflow
Auto Trait Implementations§
impl Freeze for Overflow
impl RefUnwindSafe for Overflow
impl Send for Overflow
impl Sync for Overflow
impl Unpin for Overflow
impl UnsafeUnpin for Overflow
impl UnwindSafe for Overflow
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