Struct job_scheduler::Job
source · pub struct Job<'a> { /* private fields */ }
Expand description
A schedulable Job
.
Implementations
sourceimpl<'a> Job<'a>
impl<'a> Job<'a>
sourcepub fn new<T>(schedule: Schedule, run: T) -> Job<'a>where
T: 'a,
T: FnMut(),
pub fn new<T>(schedule: Schedule, run: T) -> Job<'a>where
T: 'a,
T: FnMut(),
Create a new job.
ⓘ
// Run at second 0 of the 15th minute of the 6th, 8th, and 10th hour
// of any day in March and June that is a Friday of the year 2017.
let s: Schedule = "0 15 6,8,10 * Mar,Jun Fri 2017".into().unwrap();
Job::new(s, || println!("I have a complex schedule...") );
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Job<'a>
impl<'a> !Send for Job<'a>
impl<'a> !Sync for Job<'a>
impl<'a> Unpin for Job<'a>
impl<'a> !UnwindSafe for Job<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more