Function repeat

Source
pub fn repeat<F, T>(f: fn() -> F, interval: Duration) -> Subscription<T>
where F: Future<Output = T> + MaybeSend + 'static, T: MaybeSend + 'static,
Available on non-WebAssembly and crate feature tokio only.
Expand description

Returns a Subscription that runs the given async function at a set interval; producing the result of the function as output.