pub struct TaskContext {
pub task_id: String,
pub execution_id: String,
pub scheduled_time: SystemTime,
pub actual_start_time: Option<SystemTime>,
pub metadata: HashMap<String, String>,
}
Expand description
Task execution context
Fields§
§task_id: String
§execution_id: String
§scheduled_time: SystemTime
§actual_start_time: Option<SystemTime>
§metadata: HashMap<String, String>
Implementations§
Source§impl TaskContext
impl TaskContext
pub fn new(task_id: String, scheduled_time: SystemTime) -> Self
pub fn with_metadata(self, key: String, value: String) -> Self
pub fn mark_started(&mut self)
pub fn execution_delay(&self) -> Option<Duration>
Trait Implementations§
Source§impl Clone for TaskContext
impl Clone for TaskContext
Source§fn clone(&self) -> TaskContext
fn clone(&self) -> TaskContext
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 TaskContext
impl RefUnwindSafe for TaskContext
impl Send for TaskContext
impl Sync for TaskContext
impl Unpin for TaskContext
impl UnwindSafe for TaskContext
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