pub struct StateEvent {
pub task_name: String,
pub old_state: TaskState,
pub new_state: TaskState,
pub timestamp: Instant,
pub error: Option<String>,
}Expand description
状态事件
当任务状态变更时发出的事件
Fields§
§task_name: String任务名称
old_state: TaskState旧状态
new_state: TaskState新状态
timestamp: Instant事件时间
error: Option<String>错误信息(如果状态变更为 Failed)
Implementations§
Source§impl StateEvent
impl StateEvent
Trait Implementations§
Source§impl Clone for StateEvent
impl Clone for StateEvent
Auto Trait Implementations§
impl Freeze for StateEvent
impl RefUnwindSafe for StateEvent
impl Send for StateEvent
impl Sync for StateEvent
impl Unpin for StateEvent
impl UnsafeUnpin for StateEvent
impl UnwindSafe for StateEvent
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