pub struct TaskEntry {
pub namespace: fn() -> TaskNamespace,
pub constructor: fn() -> Arc<dyn Task>,
}Expand description
Task entry emitted by #[task]. The package!() shell walks
inventory::iter::<TaskEntry> to build the per-task metadata in
get_task_metadata and to dispatch task execution by name in
execute_task.
Fields§
§namespace: fn() -> TaskNamespaceDeferred construction of the task namespace (cannot be const because
TaskNamespace contains String).
constructor: fn() -> Arc<dyn Task>Task constructor — instantiates a fresh task object on each call.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TaskEntry
impl RefUnwindSafe for TaskEntry
impl Send for TaskEntry
impl Sync for TaskEntry
impl Unpin for TaskEntry
impl UnsafeUnpin for TaskEntry
impl UnwindSafe for TaskEntry
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