pub struct DurableWorkOptions {
pub tasks: Arc<dyn TaskHost>,
pub schedules: Option<Arc<SchedulesModule>>,
pub goal: Option<Arc<GoalDriver>>,
pub jobs: Option<Arc<Host>>,
pub clock: Arc<dyn TickClock>,
pub on_tick: Option<TickObserver>,
}Expand description
What DurableWork::open takes. Every part is optional except the task host.
Fields§
§tasks: Arc<dyn TaskHost>The task journal’s owner: firings and goal runs are admitted through it.
schedules: Option<Arc<SchedulesModule>>§goal: Option<Arc<GoalDriver>>§jobs: Option<Arc<Host>>The host whose shell jobs this worker owns (recovered by Host::with_journal); stopped or handed over on
close.
clock: Arc<dyn TickClock>§on_tick: Option<TickObserver>Sees every tick’s report ({fired, failed}), e.g. to wake the session when a firing was admitted.
Implementations§
Source§impl DurableWorkOptions
impl DurableWorkOptions
pub fn new(tasks: Arc<dyn TaskHost>) -> DurableWorkOptions
pub fn schedules(self, schedules: Arc<SchedulesModule>) -> Self
pub fn goal(self, goal: Arc<GoalDriver>) -> Self
pub fn jobs(self, jobs: Arc<Host>) -> Self
pub fn clock(self, clock: Arc<dyn TickClock>) -> Self
pub fn on_tick(self, observer: TickObserver) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for DurableWorkOptions
impl !UnwindSafe for DurableWorkOptions
impl Forget for DurableWorkOptions
impl Freeze for DurableWorkOptions
impl Move for DurableWorkOptions
impl Send for DurableWorkOptions
impl Sync for DurableWorkOptions
impl Unpin for DurableWorkOptions
impl UnsafeUnpin for DurableWorkOptions
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