pub trait DebugUnwrapExt {
type Value;
// Required methods
unsafe fn debug_unwrap_unchecked(self) -> Self::Value;
unsafe fn debug_expect_unchecked(self, msg: &str) -> Self::Value;
}
Expand description
Extension trait providing debug only checking of item validity
Required Associated Types§
Required Methods§
Sourceunsafe fn debug_unwrap_unchecked(self) -> Self::Value
unsafe fn debug_unwrap_unchecked(self) -> Self::Value
Returns the contained Some()
or Ok()
variant without checking
the discriminant only in Release mode.
§Panics
When debug assertions are enabled this function will panic if the
value is not Some()
or Ok()
.
§Safety
Calling this method on None
or Err()
is undefined behavior when
debug assertions are disabled.