pub struct SettingsBindDropGuard(/* private fields */);
Expand description
Returned from Settings::bind_to_scope
This type is not shareable between threads:
ⓘ
let mut settings = insta::Settings::clone_current();
settings.set_snapshot_suffix("test drop guard");
let guard = settings.bind_to_scope();
std::thread::spawn(move || { let guard = guard; }); // doesn't compile
This is to ensure tests under async runtimes like tokio
don’t show unexpected results
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SettingsBindDropGuard
impl RefUnwindSafe for SettingsBindDropGuard
impl !Send for SettingsBindDropGuard
impl Sync for SettingsBindDropGuard
impl Unpin for SettingsBindDropGuard
impl UnwindSafe for SettingsBindDropGuard
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