pub struct TaskHandler<T: Clone + Send + Sync> {
pub module: String,
pub name: String,
pub cron: Schedule,
pub func: fn(TaskContext<T>) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>,
}
Fields§
§module: String
§name: String
§cron: Schedule
§func: fn(TaskContext<T>) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for TaskHandler<T>
impl<T> RefUnwindSafe for TaskHandler<T>
impl<T> Send for TaskHandler<T>
impl<T> Sync for TaskHandler<T>
impl<T> Unpin for TaskHandler<T>
impl<T> UnwindSafe for TaskHandler<T>
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