pub struct SimpleTimer<F>{ /* private fields */ }Expand description
A simple timer that executes a function based on a schedule
Implementations§
Trait Implementations§
Source§impl<Context, Action, F> TimerNode<Context, Action> for SimpleTimer<F>where
Context: Send + Sync + 'static,
Action: ActionType + Send + Sync + 'static + Default + Debug,
F: Fn(&mut Context) -> Result<Action, FloxideError> + Send + Sync + 'static,
impl<Context, Action, F> TimerNode<Context, Action> for SimpleTimer<F>where
Context: Send + Sync + 'static,
Action: ActionType + Send + Sync + 'static + Default + Debug,
F: Fn(&mut Context) -> Result<Action, FloxideError> + Send + Sync + 'static,
Source§fn execute_on_schedule<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 mut Context,
) -> Pin<Box<dyn Future<Output = Result<Action, FloxideError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute_on_schedule<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 mut Context,
) -> Pin<Box<dyn Future<Output = Result<Action, FloxideError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute the node on schedule
Auto Trait Implementations§
impl<F> Freeze for SimpleTimer<F>where
F: Freeze,
impl<F> RefUnwindSafe for SimpleTimer<F>where
F: RefUnwindSafe,
impl<F> Send for SimpleTimer<F>
impl<F> Sync for SimpleTimer<F>
impl<F> Unpin for SimpleTimer<F>where
F: Unpin,
impl<F> UnwindSafe for SimpleTimer<F>where
F: UnwindSafe,
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