11 lines
263 B
Rust
11 lines
263 B
Rust
use crate::error::DrawerError;
|
|
|
|
pub trait Operation {
|
|
fn validate(&self) -> Result<(), DrawerError>;
|
|
fn execute(&self) -> Result<(), DrawerError>;
|
|
fn perform(&self) -> Result<(), DrawerError> {
|
|
self.validate()?;
|
|
self.execute()
|
|
}
|
|
}
|