pub struct TrappedFlag { /* private fields */ }
Expand description
An RAII trap that ensures a drop flag is correctly cleared.
This type is similar to a DroppingFlag
, except that it does not wrap
a value and rather than leaking memory aborts the program if its flag is
not cleared.
This type is useful for safely constructing MoveRef
s.
Implementations§
Source§impl TrappedFlag
impl TrappedFlag
Trait Implementations§
Source§impl Default for TrappedFlag
impl Default for TrappedFlag
Auto Trait Implementations§
impl !Freeze for TrappedFlag
impl !RefUnwindSafe for TrappedFlag
impl Send for TrappedFlag
impl !Sync for TrappedFlag
impl Unpin for TrappedFlag
impl UnwindSafe for TrappedFlag
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