pub struct CloseGuard {
pub value: Value,
pub close_fn: Value,
}Expand description
A value paired with the callable that closes it at scope exit.
Fields§
§value: ValueThe value being closed.
close_fn: ValueThe callable invoked to close value.
Implementations§
Trait Implementations§
Source§impl Clone for CloseGuard
impl Clone for CloseGuard
Source§fn clone(&self) -> CloseGuard
fn clone(&self) -> CloseGuard
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for CloseGuard
impl !UnwindSafe for CloseGuard
impl Freeze for CloseGuard
impl Send for CloseGuard
impl Sync for CloseGuard
impl Unpin for CloseGuard
impl UnsafeUnpin for CloseGuard
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