pub struct DelayedTask<T: Send + Sync + Clone + 'static> {
pub id: TaskId,
pub name: String,
pub execute_at: DateTime<Utc>,
pub priority: u32,
pub data: T,
pub created_at: DateTime<Utc>,
}Expand description
延迟任务
Fields§
§id: TaskId任务 ID
name: String任务名称
execute_at: DateTime<Utc>执行时间
priority: u32优先级 (数值越小优先级越高)
data: T任务数据
created_at: DateTime<Utc>创建时间
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for DelayedTask<T>where
T: Freeze,
impl<T> RefUnwindSafe for DelayedTask<T>where
T: RefUnwindSafe,
impl<T> Send for DelayedTask<T>
impl<T> Sync for DelayedTask<T>
impl<T> Unpin for DelayedTask<T>where
T: Unpin,
impl<T> UnsafeUnpin for DelayedTask<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for DelayedTask<T>where
T: UnwindSafe,
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