[−][src]Struct smartpool::timescheduler::TimeScheduler
A thread that schedules events to occur in the future.
Methods
impl TimeScheduler
[src]
pub fn new() -> Self
[src]
pub fn at(&self, moment: SteadyTime) -> FutureMoment
[src]
A future that occurs at the given moment.
pub fn after(&self, delay: Duration) -> FutureMoment
[src]
A future that occurs after the given delay.
pub fn periodically(
&self,
start: SteadyTime,
period: Duration
) -> PeriodicMoments
[src]
&self,
start: SteadyTime,
period: Duration
) -> PeriodicMoments
A stream that produces values on a set interval.
pub fn run_at(
&self,
moment: SteadyTime,
future: impl Future<Item = (), Error = ()> + Send + 'static,
exec: impl Exec + Send + 'static
)
[src]
&self,
moment: SteadyTime,
future: impl Future<Item = (), Error = ()> + Send + 'static,
exec: impl Exec + Send + 'static
)
Run a future in an executor at a moment in the future.
pub fn run_at_param<P: Send + 'static>(
&self,
moment: SteadyTime,
future: impl Future<Item = (), Error = ()> + Send + 'static,
exec: impl ExecParam<Param = P> + Send + 'static,
param: P
)
[src]
&self,
moment: SteadyTime,
future: impl Future<Item = (), Error = ()> + Send + 'static,
exec: impl ExecParam<Param = P> + Send + 'static,
param: P
)
Run a future in an executor with a parameter at a moment in the future.
pub fn run_after(
&self,
delay: Duration,
future: impl Future<Item = (), Error = ()> + Send + 'static,
exec: impl Exec + Send + 'static
)
[src]
&self,
delay: Duration,
future: impl Future<Item = (), Error = ()> + Send + 'static,
exec: impl Exec + Send + 'static
)
Run a future in an executor after a delay.
pub fn run_after_param<P: Send + 'static>(
&self,
delay: Duration,
future: impl Future<Item = (), Error = ()> + Send + 'static,
exec: impl ExecParam<Param = P> + Send + 'static,
param: P
)
[src]
&self,
delay: Duration,
future: impl Future<Item = (), Error = ()> + Send + 'static,
exec: impl ExecParam<Param = P> + Send + 'static,
param: P
)
Run a future in an executor with a parameter after a delay.
Trait Implementations
impl Clone for TimeScheduler
[src]
fn clone(&self) -> TimeScheduler
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl Send for TimeScheduler
impl Sync for TimeScheduler
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,