pub struct HostDeliveryPolicy { /* private fields */ }Expand description
The terms one delivery is offered under.
Implementations§
Source§impl HostDeliveryPolicy
impl HostDeliveryPolicy
Sourcepub fn new(
mode: HostDeliveryMode,
lease_duration: DurationMs,
ack_timeout: Option<DurationMs>,
max_attempts: DeliveryAttemptLimit,
follow_replacement: FollowReplacement,
) -> Result<Self, DomainError>
pub fn new( mode: HostDeliveryMode, lease_duration: DurationMs, ack_timeout: Option<DurationMs>, max_attempts: DeliveryAttemptLimit, follow_replacement: FollowReplacement, ) -> Result<Self, DomainError>
Construct a validated policy.
The lease is bounded at both ends on purpose. A zero-length lease is exclusive to nobody, and an unbounded one strands an item behind a host that never comes back.
Sourcepub fn activation() -> Self
pub fn activation() -> Self
The defaults for a destination the engine wakes.
pub const fn mode(&self) -> HostDeliveryMode
pub const fn lease_duration(&self) -> DurationMs
Sourcepub const fn ack_timeout(&self) -> Option<DurationMs>
pub const fn ack_timeout(&self) -> Option<DurationMs>
How long an acknowledged delivery may sit before it expires.
pub const fn max_attempts(&self) -> DeliveryAttemptLimit
pub const fn follow_replacement(&self) -> FollowReplacement
Sourcepub fn following_replacement(self) -> Self
pub fn following_replacement(self) -> Self
The same terms, with replacement following turned on.
Trait Implementations§
Source§impl Clone for HostDeliveryPolicy
impl Clone for HostDeliveryPolicy
Source§impl Debug for HostDeliveryPolicy
impl Debug for HostDeliveryPolicy
Source§impl Default for HostDeliveryPolicy
impl Default for HostDeliveryPolicy
Source§impl<'de> Deserialize<'de> for HostDeliveryPolicy
impl<'de> Deserialize<'de> for HostDeliveryPolicy
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 HostDeliveryPolicy
Source§impl PartialEq for HostDeliveryPolicy
impl PartialEq for HostDeliveryPolicy
Source§impl Serialize for HostDeliveryPolicy
impl Serialize for HostDeliveryPolicy
impl StructuralPartialEq for HostDeliveryPolicy
Auto Trait Implementations§
impl Freeze for HostDeliveryPolicy
impl RefUnwindSafe for HostDeliveryPolicy
impl Send for HostDeliveryPolicy
impl Sync for HostDeliveryPolicy
impl Unpin for HostDeliveryPolicy
impl UnsafeUnpin for HostDeliveryPolicy
impl UnwindSafe for HostDeliveryPolicy
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