pub struct DelayConfig {
pub delay_ms: u64,
pub dynamic_header: Option<String>,
pub max_delay_ms: u64,
}Fields§
§delay_ms: u64§dynamic_header: Option<String>§max_delay_ms: u64Hard cap for header-derived delay values. A header value larger than
this is clamped to max_delay_ms before the cast. Defaults to
DEFAULT_MAX_DELAY_MS (1 hour). The processor MUST consult this cap
before constructing the Duration it sleeps on.
Implementations§
Source§impl DelayConfig
impl DelayConfig
pub fn new(delay_ms: u64) -> Self
pub fn with_dynamic_header(self, header: impl Into<String>) -> Self
Sourcepub fn with_max_delay_ms(self, max_ms: u64) -> Self
pub fn with_max_delay_ms(self, max_ms: u64) -> Self
Override the cap on header-derived delays. Pass a value larger than
DEFAULT_MAX_DELAY_MS only when the operator has a real reason to
sleep longer; the value is a hard ceiling, not a soft target.
pub fn from_duration(duration: Duration) -> Self
pub fn from_duration_with_header( duration: Duration, header: impl Into<String>, ) -> Self
Trait Implementations§
Source§impl Clone for DelayConfig
impl Clone for DelayConfig
Source§fn clone(&self) -> DelayConfig
fn clone(&self) -> DelayConfig
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 moreAuto Trait Implementations§
impl Freeze for DelayConfig
impl RefUnwindSafe for DelayConfig
impl Send for DelayConfig
impl Sync for DelayConfig
impl Unpin for DelayConfig
impl UnsafeUnpin for DelayConfig
impl UnwindSafe for DelayConfig
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