pub struct TimerConfig {
pub name: String,
pub period: Duration,
pub delay: Duration,
pub repeat_count: Option<u32>,
}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: DurationInterval between ticks (milliseconds). Default: 1000.
delay: DurationInitial delay before the first tick (milliseconds). Default: 0.
repeat_count: Option<u32>Maximum number of ticks. None means infinite.
Implementations§
Source§impl TimerConfig
impl TimerConfig
Sourcepub fn from_uri(uri: &str) -> Result<Self, CamelError>
pub fn from_uri(uri: &str) -> Result<Self, CamelError>
Parse a timer URI into a 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 moreAuto 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