pub struct TimerConfig {
pub name: String,
pub period: Duration,
pub delay: Duration,
pub repeat_count: Option<u32>,
/* private fields */
}Expand description
Configuration parsed from a timer URI.
Format: timer:name?period=1000&delay=0&repeatCount=0
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.
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.
Trait Implementations§
Source§impl Clone for TimerConfig
impl Clone for TimerConfig
Source§fn clone(&self) -> TimerConfig
fn clone(&self) -> TimerConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 TimerConfig
impl Debug for TimerConfig
Source§impl UriConfig for TimerConfig
impl UriConfig for TimerConfig
Source§fn scheme() -> &'static str
fn scheme() -> &'static str
Returns the URI scheme this config handles (e.g., “timer”, “http”).
Source§fn from_uri(uri: &str) -> Result<Self, CamelError>
fn from_uri(uri: &str) -> Result<Self, CamelError>
Parse a URI string into this configuration.
Source§fn from_components(parts: UriComponents) -> Result<Self, CamelError>
fn from_components(parts: UriComponents) -> Result<Self, CamelError>
Parse already-extracted URI components into this configuration.
Source§fn validate(self) -> Result<Self, CamelError>
fn validate(self) -> Result<Self, CamelError>
Override to add validation logic after parsing.
Auto Trait Implementations§
impl Freeze for TimerConfig
impl RefUnwindSafe for TimerConfig
impl Send for TimerConfig
impl Sync for TimerConfig
impl Unpin for TimerConfig
impl UnsafeUnpin for TimerConfig
impl UnwindSafe for TimerConfig
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