pub struct Meta {
pub name: String,
pub deadline: Option<Instant>,
pub tick: DateTime<Utc>,
}Expand description
Metadata about the current cron job execution passed to handlers.
Obtain a Meta value inside a handler by declaring it as a handler
argument — the scheduler extracts it from the CronContext
automatically via FromCronContext.
Fields§
§name: StringFully qualified type name of the registered handler function.
deadline: Option<Instant>Deadline by which the handler must finish, derived from
CronOptions::timeout_secs.
Always Some for jobs started through SchedulerBuilder.
tick: DateTime<Utc>The scheduled tick time that triggered this execution.
Trait Implementations§
Source§impl FromCronContext for Meta
impl FromCronContext for Meta
Source§fn from_cron_context(ctx: &CronContext) -> Result<Self>
fn from_cron_context(ctx: &CronContext) -> Result<Self>
Attempt to extract
Self from the given context. Read moreAuto Trait Implementations§
impl Freeze for Meta
impl RefUnwindSafe for Meta
impl Send for Meta
impl Sync for Meta
impl Unpin for Meta
impl UnsafeUnpin for Meta
impl UnwindSafe for Meta
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