pub struct TaskDescriptor {
pub name: String,
pub mode: TaskMode,
pub kind: TaskKind,
pub config: Value,
}Expand description
Descriptor sent over the control channel to register tasks at runtime.
Send a SchedulerMessage::Add wrapping a boxed TaskDescriptor to add a
new task (or replace an existing one with the same name) without stopping the
scheduler loop.
Fields§
§name: StringUnique name for the task. Replaces any existing task with the same name.
mode: TaskModeExecution mode (periodic or one-shot).
kind: TaskKindThe category of work this task performs.
config: ValueArbitrary JSON configuration forwarded to the TaskHandler at execution time.
Auto Trait Implementations§
impl Freeze for TaskDescriptor
impl RefUnwindSafe for TaskDescriptor
impl Send for TaskDescriptor
impl Sync for TaskDescriptor
impl Unpin for TaskDescriptor
impl UnsafeUnpin for TaskDescriptor
impl UnwindSafe for TaskDescriptor
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> 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