opus refactoring
This commit is contained in:
+5
-1
@@ -1,6 +1,10 @@
|
||||
use crate::error::DrawerError;
|
||||
|
||||
pub trait Operation {
|
||||
fn perform(&self) -> Result<(), DrawerError>;
|
||||
fn validate(&self) -> Result<(), DrawerError>;
|
||||
fn execute(&self) -> Result<(), DrawerError>;
|
||||
fn perform(&self) -> Result<(), DrawerError> {
|
||||
self.validate()?;
|
||||
self.execute()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user