opus refactoring

This commit is contained in:
2026-05-14 19:53:48 -05:00
parent 365e4bddcc
commit 4dd0c79b20
6 changed files with 53 additions and 54 deletions
+5 -1
View File
@@ -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()
}
}