pub struct PartialDeliveryState {
pub attempt: u32,
pub first_received: DateTime<Utc>,
pub last_received: DateTime<Utc>,
pub redelivered: bool,
}Expand description
Backend-supplied delivery facts for an in-flight message.
Backends emit this from read_new / reclaim_idle; the bus layer pairs
it with the subscription’s max_retry to construct the full
DeliveryState that handlers see via DeliveryInspector::state.
Splitting the type makes the protocol explicit at the type level: a
backend can’t accidentally fabricate max_attempt, and the bus can’t
accidentally forget to set it.
Fields§
§attempt: u32§first_received: DateTime<Utc>§last_received: DateTime<Utc>§redelivered: boolImplementations§
Source§impl PartialDeliveryState
impl PartialDeliveryState
Sourcepub fn with_max_attempt(self, max_attempt: u32) -> DeliveryState
pub fn with_max_attempt(self, max_attempt: u32) -> DeliveryState
Pair with the subscription-level retry budget to produce the full
DeliveryState visible to handlers.
Trait Implementations§
Source§impl Clone for PartialDeliveryState
impl Clone for PartialDeliveryState
Source§fn clone(&self) -> PartialDeliveryState
fn clone(&self) -> PartialDeliveryState
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 PartialDeliveryState
impl Debug for PartialDeliveryState
Source§impl<'de> Deserialize<'de> for PartialDeliveryState
impl<'de> Deserialize<'de> for PartialDeliveryState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PartialDeliveryState
Source§impl PartialEq for PartialDeliveryState
impl PartialEq for PartialDeliveryState
Source§fn eq(&self, other: &PartialDeliveryState) -> bool
fn eq(&self, other: &PartialDeliveryState) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PartialDeliveryState
impl Serialize for PartialDeliveryState
impl StructuralPartialEq for PartialDeliveryState
Auto Trait Implementations§
impl Freeze for PartialDeliveryState
impl RefUnwindSafe for PartialDeliveryState
impl Send for PartialDeliveryState
impl Sync for PartialDeliveryState
impl Unpin for PartialDeliveryState
impl UnsafeUnpin for PartialDeliveryState
impl UnwindSafe for PartialDeliveryState
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