pub struct DeliveryAttemptLimit(/* private fields */);Expand description
How many failed attempts a delivery is worth before it stays failed.
Implementations§
Source§impl DeliveryAttemptLimit
impl DeliveryAttemptLimit
Sourcepub fn new(value: u32) -> Result<Self, DomainError>
pub fn new(value: u32) -> Result<Self, DomainError>
Construct a validated limit.
pub const fn value(self) -> u32
Sourcepub const fn is_exhausted_by(self, attempt: DeliveryAttempt) -> bool
pub const fn is_exhausted_by(self, attempt: DeliveryAttempt) -> bool
Whether this many attempts exhausts the delivery.
Trait Implementations§
Source§impl Clone for DeliveryAttemptLimit
impl Clone for DeliveryAttemptLimit
impl Copy for DeliveryAttemptLimit
Source§impl Debug for DeliveryAttemptLimit
impl Debug for DeliveryAttemptLimit
Source§impl Default for DeliveryAttemptLimit
impl Default for DeliveryAttemptLimit
Source§impl<'de> Deserialize<'de> for DeliveryAttemptLimit
impl<'de> Deserialize<'de> for DeliveryAttemptLimit
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
Source§impl Display for DeliveryAttemptLimit
impl Display for DeliveryAttemptLimit
impl Eq for DeliveryAttemptLimit
Source§impl Hash for DeliveryAttemptLimit
impl Hash for DeliveryAttemptLimit
Source§impl Ord for DeliveryAttemptLimit
impl Ord for DeliveryAttemptLimit
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for DeliveryAttemptLimit
impl PartialEq for DeliveryAttemptLimit
Source§impl PartialOrd for DeliveryAttemptLimit
impl PartialOrd for DeliveryAttemptLimit
Source§impl Serialize for DeliveryAttemptLimit
impl Serialize for DeliveryAttemptLimit
impl StructuralPartialEq for DeliveryAttemptLimit
Auto Trait Implementations§
impl Freeze for DeliveryAttemptLimit
impl RefUnwindSafe for DeliveryAttemptLimit
impl Send for DeliveryAttemptLimit
impl Sync for DeliveryAttemptLimit
impl Unpin for DeliveryAttemptLimit
impl UnsafeUnpin for DeliveryAttemptLimit
impl UnwindSafe for DeliveryAttemptLimit
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