pub trait SecureOperationExt: Sized {
type Output;
// Required method
fn execute_with_cleanup<F>(self, cleanup: F) -> Result<Self::Output>
where F: FnOnce();
}Expand description
Extension trait for operations that produce a result
Required Associated Types§
Required Methods§
Sourcefn execute_with_cleanup<F>(self, cleanup: F) -> Result<Self::Output>where
F: FnOnce(),
fn execute_with_cleanup<F>(self, cleanup: F) -> Result<Self::Output>where
F: FnOnce(),
Execute the operation and ensure cleanup on both success and failure
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".