Trait OnStopFn

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

Hooks that are called when the agent stop

Implementors§

Source§

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