pub struct ValidatingWrapper<T> { /* private fields */ }Implementations§
Source§impl<T> ValidatingWrapper<T>
impl<T> ValidatingWrapper<T>
Sourcepub fn new(op: Box<dyn Op<T>>) -> Self
pub fn new(op: Box<dyn Op<T>>) -> Self
Create new validating wrapper that validates both input and output
Sourcepub fn input_only(op: Box<dyn Op<T>>) -> Self
pub fn input_only(op: Box<dyn Op<T>>) -> Self
Create validating wrapper that only validates input
Sourcepub fn output_only(op: Box<dyn Op<T>>) -> Self
pub fn output_only(op: Box<dyn Op<T>>) -> Self
Create validating wrapper that only validates output
Trait Implementations§
Source§impl<T> Op<T> for ValidatingWrapper<T>
impl<T> Op<T> for ValidatingWrapper<T>
fn perform<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
dry: &'life1 mut DryContext,
wet: &'life2 mut WetContext,
) -> Pin<Box<dyn Future<Output = OpResult<T>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn metadata(&self) -> OpMetadata
Source§fn rollback<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_dry: &'life1 mut DryContext,
_wet: &'life2 mut WetContext,
) -> Pin<Box<dyn Future<Output = OpResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn rollback<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_dry: &'life1 mut DryContext,
_wet: &'life2 mut WetContext,
) -> Pin<Box<dyn Future<Output = OpResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Optional rollback method for ops that need custom cleanup logic.
Default implementation is a no-op for backward compatibility.
Called automatically by batch operations when a later op fails.
Auto Trait Implementations§
impl<T> !RefUnwindSafe for ValidatingWrapper<T>
impl<T> !UnwindSafe for ValidatingWrapper<T>
impl<T> Freeze for ValidatingWrapper<T>
impl<T> Send for ValidatingWrapper<T>
impl<T> Sync for ValidatingWrapper<T>
impl<T> Unpin for ValidatingWrapper<T>
impl<T> UnsafeUnpin for ValidatingWrapper<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more