Skip to main content

ValidatableCommand

Trait ValidatableCommand 

Source
pub trait ValidatableCommand: Command {
    type ValidationError: Error + Send + Sync;

    // Required method
    fn validate(&self) -> Result<(), Self::ValidationError>;
}
Expand description

Trait for commands that can be validated before execution.

Required Associated Types§

Source

type ValidationError: Error + Send + Sync

Validation error type.

Required Methods§

Source

fn validate(&self) -> Result<(), Self::ValidationError>

Validate the command before execution.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§