ExecutionErrorTrait

Trait ExecutionErrorTrait 

Source
pub trait ExecutionErrorTrait:
    From<ExecutionError>
    + Debug
    + Error
    + Send
    + Sync
    + Sized {
    // Required methods
    fn with_command_index(self, command: CommandIndex) -> Self;
    fn kind(&self) -> &ExecutionErrorKind;
    fn command(&self) -> Option<CommandIndex>;
    fn source_ref(&self) -> Option<&(dyn Error + 'static)>;

    // Provided method
    fn to_execution_failure(&self) -> ExecutionFailure { ... }
}
Expand description

A trait for execution errors that provides common methods for accessing error information and creating new errors.

Required Methods§

Source

fn with_command_index(self, command: CommandIndex) -> Self

Source

fn kind(&self) -> &ExecutionErrorKind

Source

fn command(&self) -> Option<CommandIndex>

Source

fn source_ref(&self) -> Option<&(dyn Error + 'static)>

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§