pub struct FailGuard(_);
Expand description
Configure fail point in RAII style.
Implementations
sourceimpl FailGuard
impl FailGuard
sourcepub fn new<S: Into<String>>(name: S, actions: &str) -> Result<FailGuard, String>
pub fn new<S: Into<String>>(name: S, actions: &str) -> Result<FailGuard, String>
Configure the actions for a fail point during the lifetime of the returning FailGuard
.
Read documentation of [cfg
] for more details.
sourcepub fn with_callback<S, F>(name: S, f: F) -> Result<FailGuard, String>where
S: Into<String>,
F: Fn() + Send + Sync + 'static,
pub fn with_callback<S, F>(name: S, f: F) -> Result<FailGuard, String>where
S: Into<String>,
F: Fn() + Send + Sync + 'static,
Configure the actions for a fail point during the lifetime of the returning FailGuard
.
Read documentation of cfg_callback
for more details.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FailGuard
impl Send for FailGuard
impl Sync for FailGuard
impl Unpin for FailGuard
impl UnwindSafe for FailGuard
Blanket Implementations
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more