pub enum OverflowStrategy {
Block,
DropOldest,
DropNewest,
Reject,
}Expand description
溢出处理策略
Block:阻塞等待(async,直到队列有空间)DropOldest:丢弃最旧消息后插入新的DropNewest:丢弃新消息(返回 Ok,不插入)Reject:拒绝(返回 Err)
Variants§
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 moreimpl Copy for OverflowStrategy
Source§impl Debug for OverflowStrategy
impl Debug for OverflowStrategy
impl Eq for OverflowStrategy
Source§impl PartialEq for OverflowStrategy
impl PartialEq 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