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§
Sourcetype ValidationError: Error + Send + Sync
type ValidationError: Error + Send + Sync
Validation error type.
Required Methods§
Sourcefn validate(&self) -> Result<(), Self::ValidationError>
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".