pub trait RunCommandExt<R: Runtime + ?Sized> {
    type Item: 'static;

    fn as_command<'a, H, Fh>(
        self,
        ctx: &mut Context<R>,
        handler: H
    ) -> ProcessIdResponse<'a>
    where
        H: FnOnce(Self::Item, RunCommandContext) -> Fh + 'static,
        Fh: Future<Output = Result<(), Error>> + 'static
; }
Expand description

Wraps command lifecycle in the following manner:

  • manages command sequence numbers
  • emits command start & stop events
  • provides a RunCommandContext object for easier output event emission

Required Associated Types§

Required Methods§

Wrap self in run_command

Implementors§

Implements RunCommandExt for Futures outputting Results. The output result is checked prior to emitting any command lifecycle events.