pub struct ScopeGuard { /* private fields */ }Expand description
Restores the previous scope when dropped.
Must be bound to a named variable: let _guard = .... Binding to _ drops
it immediately and the scope is never active.
Trait Implementations§
Source§impl Debug for ScopeGuard
impl Debug for ScopeGuard
Source§impl Drop for ScopeGuard
impl Drop for ScopeGuard
Auto Trait Implementations§
impl Forget for ScopeGuard
impl Freeze for ScopeGuard
impl Move for ScopeGuard
impl RefUnwindSafe for ScopeGuard
impl Send for ScopeGuard
impl Sync for ScopeGuard
impl Unpin for ScopeGuard
impl UnsafeUnpin for ScopeGuard
impl UnwindSafe for ScopeGuard
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