pub struct DryRunGuard { /* private fields */ }Expand description
RAII guard that sets global dry-run on creation and restores the previous value on drop. Useful in tests to avoid leaking state.
§Examples
use ironflow_core::dry_run::DryRunGuard;
{
let _guard = DryRunGuard::new(true);
// operations here run in dry-run mode
}
// previous dry-run state restoredImplementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DryRunGuard
impl RefUnwindSafe for DryRunGuard
impl Send for DryRunGuard
impl Sync for DryRunGuard
impl Unpin for DryRunGuard
impl UnsafeUnpin for DryRunGuard
impl UnwindSafe for DryRunGuard
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