pub(crate) struct DropBombCondition {
status: Status,
}
Expand description
Drop condition: for ensuring that a condition is true, on drop
Obtained from DropBombCondition::new_armed()
.
Instead of dropping this, you must call
drop_bomb_disarm_assert!
(or its internal function disarm_assert()
.
It will often be necessary to add #[allow(dead_code)]
on the DropBombCondition
field of a containing type,
since outside tests, the Drop
impl will usually be configured out,
and that’s the only place this field is actually read.
§Panics
Panics (actually) if it is simply dropped.
Fields§
§status: Status
What state are we in
Implementations§
Trait Implementations§
Source§impl Debug for DropBombCondition
impl Debug for DropBombCondition
Source§impl Default for DropBombCondition
Ideally, if you use this, your struct’s other default values meet your drop condition!
impl Default for DropBombCondition
Ideally, if you use this, your struct’s other default values meet your drop condition!
Source§fn default() -> DropBombCondition
fn default() -> DropBombCondition
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DropBombCondition
impl RefUnwindSafe for DropBombCondition
impl Send for DropBombCondition
impl Sync for DropBombCondition
impl Unpin for DropBombCondition
impl UnwindSafe for DropBombCondition
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more