pub struct ScheduledTaskRecord {
pub name: String,
pub kind: String,
pub task_mode: String,
pub next_run: String,
}Expand description
A scheduled task row returned by JobStore::list_jobs.
Replaces the previous (String, String, String, String) tuple to eliminate
positional destructuring bugs. Fields map 1-to-1 to the SQL columns in the
same order as the query: name, kind, task_mode, and the coalesced
next_run.
§Examples
use zeph_scheduler::JobStore;
let store = JobStore::open("sqlite:scheduler.db").await?;
store.init().await?;
for job in store.list_jobs().await? {
println!("{}: {} ({}) → {}", job.name, job.kind, job.task_mode, job.next_run);
}Fields§
§name: StringUnique task name (primary key in the scheduled_jobs table).
kind: StringSerialised crate::TaskKind string (e.g. "health_check").
task_mode: StringExecution mode: "periodic" or "oneshot".
next_run: StringNext scheduled run time as an ISO 8601 / RFC 3339 string.
Falls back to run_at for one-shot jobs that have not yet computed a
next_run. Empty string when neither field is set.
Trait Implementations§
Source§impl Clone for ScheduledTaskRecord
impl Clone for ScheduledTaskRecord
Source§fn clone(&self) -> ScheduledTaskRecord
fn clone(&self) -> ScheduledTaskRecord
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 ScheduledTaskRecord
impl RefUnwindSafe for ScheduledTaskRecord
impl Send for ScheduledTaskRecord
impl Sync for ScheduledTaskRecord
impl Unpin for ScheduledTaskRecord
impl UnsafeUnpin for ScheduledTaskRecord
impl UnwindSafe for ScheduledTaskRecord
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more