pub struct CronConfig {
pub name: String,
pub schedule: String,
/* private fields */
}Expand description
Configuration parsed from a cron URI.
Format: cron:name?schedule=0 2 * * *&timeZone=UTC&includeMetadata=true
Fields§
§name: StringCron trigger name (the path portion of the URI).
schedule: String5-field Unix cron expression.
Implementations§
Source§impl CronConfig
impl CronConfig
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 CronConfig
impl CronConfig
Sourcepub fn time_zone(&self) -> Result<Tz, CamelError>
pub fn time_zone(&self) -> Result<Tz, CamelError>
Parsed timezone.
Sourcepub fn include_metadata(&self) -> bool
pub fn include_metadata(&self) -> bool
Whether metadata headers are included.
Sourcepub fn validate(&self) -> Result<(), CamelError>
pub fn validate(&self) -> Result<(), CamelError>
Validate: name non-empty, schedule is valid 5-field cron, timezone parseable.
Trait Implementations§
Source§impl Clone for CronConfig
impl Clone for CronConfig
Source§fn clone(&self) -> CronConfig
fn clone(&self) -> CronConfig
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 moreSource§impl Debug for CronConfig
impl Debug for CronConfig
Source§impl UriConfig for CronConfig
impl UriConfig for CronConfig
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 CronConfig
impl RefUnwindSafe for CronConfig
impl Send for CronConfig
impl Sync for CronConfig
impl Unpin for CronConfig
impl UnsafeUnpin for CronConfig
impl UnwindSafe for CronConfig
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