pub enum PressureResponse {
Accept,
Defer {
delay: Duration,
},
Reject {
reason: String,
},
}Expand description
Application-visible backpressure result for a publish operation.
Pressure responses are part of the successful publish path so applications can react to delivery, buffering, and shedding decisions without those signals being hidden inside transport-specific errors.
Variants§
Accept
The message was accepted and delivered to the consumer.
Defer
The message was accepted into a buffer and will be delivered later.
Reject
The consumer was overwhelmed and the message was shed.
Trait Implementations§
Source§impl Clone for PressureResponse
impl Clone for PressureResponse
Source§fn clone(&self) -> PressureResponse
fn clone(&self) -> PressureResponse
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 PressureResponse
impl Debug for PressureResponse
impl Eq for PressureResponse
Source§impl PartialEq for PressureResponse
impl PartialEq for PressureResponse
Source§fn eq(&self, other: &PressureResponse) -> bool
fn eq(&self, other: &PressureResponse) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PressureResponse
Auto Trait Implementations§
impl Freeze for PressureResponse
impl RefUnwindSafe for PressureResponse
impl Send for PressureResponse
impl Sync for PressureResponse
impl Unpin for PressureResponse
impl UnsafeUnpin for PressureResponse
impl UnwindSafe for PressureResponse
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.