Type Definition crius::Command

source ·
pub type Command<I, O, E> = Command<I, O, E, CommandFn<I, O, E>, FallbackFn<O, E>>;
Expand description

A Command is a runnable circuit breaker. It can be constructed either with or without a fallback method that can provide alternative values if the contained calls fail or if the breaker is open.

Type parameters:

  • I: Input type to the breaker’s function.
  • O: Output type of the breaker’s function.
  • E: Error type returned by the breaker’s function. This type must implement From<CriusError> to propagate internal circuit breaker errors.