IScheduler
trait · ferroui-reactive · v0.5.0
trait IScheduler
Schedules units of work (IScheduler).
Deviation (DEVIATIONS.md, Reactive): absolute times are SystemTime where upstream has
DateTimeOffset, and relative times Duration where upstream has TimeSpan. A TimeSpan may
be negative upstream and is normalized to zero by every scheduler (Scheduler.Normalize); a
Duration cannot be negative.
Members
now
fn now(self: &Self) -> SystemTime
The scheduler's notion of the current time.
schedule
fn schedule(self: &Self, action: ScheduledAction) -> Rc<dyn IDisposable>
Schedules work to run as soon as possible.
schedule_after
fn schedule_after(self: &Self, due_time: Duration, action: ScheduledAction) -> Rc<dyn IDisposable>
Schedules work to run after due_time.
schedule_at
fn schedule_at(self: &Self, due_time: SystemTime, action: ScheduledAction) -> Rc<dyn IDisposable>
Schedules work to run at due_time.
as_periodic
fn as_periodic(self: &Self) -> Option<&dyn ISchedulerPeriodic>
The periodic scheduling of the scheduler, if it has its own (GetService(typeof(ISchedulerPeriodic))).
as_stopwatch_provider
fn as_stopwatch_provider(self: &Self) -> Option<&dyn IStopwatchProvider>
The stopwatch of the scheduler, if it has its own (GetService(typeof(IStopwatchProvider))).
cancellation_token
fn cancellation_token(self: &Self) -> Option<CancellationToken>
The cancellation token of the scheduler that SchedulerExt::schedule_async hands its
body, which SchedulerExt::yield_ and SchedulerExt::sleep without a token observe
(GetCancellationToken: scheduler is CancelableScheduler cs ? cs.Token : None); none for
any other scheduler.
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.