pub struct TimerConfig {
pub name: String,
pub period: Duration,
pub delay: Duration,
pub repeat_count: Option<u32>,
pub fixed_rate: bool,
pub include_metadata: bool,
/* private fields */
}Expand description
Configuration parsed from a timer URI.
Format: timer:name?period=1000&delay=0&repeatCount=0&fixedRate=false&includeMetadata=true
Fields§
§name: StringTimer name (the path portion of the URI).
period: DurationConverted Duration for period.
delay: DurationConverted Duration for delay.
repeat_count: Option<u32>Maximum number of ticks. None means infinite.
fixed_rate: boolWhen true, use fixed-rate semantics (skip missed ticks). When false (default), use burst semantics (fire all missed ticks immediately).
include_metadata: boolWhen true (default), include metadata headers (CamelTimerFiredTime, CamelMessageTimestamp, CamelTimerName) in each exchange. When false, send a minimal exchange without metadata headers.
Implementations§
Source§impl TimerConfig
impl TimerConfig
Sourcepub fn parse_uri_components(parts: UriComponents) -> Result<Self, CamelError>
pub fn parse_uri_components(parts: UriComponents) -> Result<Self, CamelError>
Parse URI components into this config.
Call this from your custom UriConfig::from_components implementation.
Source§impl TimerConfig
impl TimerConfig
Sourcepub fn validate(&self) -> Result<(), CamelError>
pub fn validate(&self) -> Result<(), CamelError>
Validate the configuration without consuming self.
Trait Implementations§
Source§impl Clone for TimerConfig
impl Clone for TimerConfig
Source§fn clone(&self) -> TimerConfig
fn clone(&self) -> TimerConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more