Trait OnStartFn

Source
pub trait OnStartFn:
    for<'a> Fn(&'a Agent) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
    + Send
    + Sync
    + DynClone { }
Expand description

Hooks that are called when the agent starts, either from pending or stopped

Implementors§

Source§

impl<F> OnStartFn for F
where F: for<'a> Fn(&'a Agent) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>> + Send + Sync + DynClone,