pub trait Status: Copy + PartialEq {
const SUCCESS: Self;
// Required method
fn as_string(&self) -> &'static str;
// Provided methods
fn is_success(&self) -> bool { ... }
fn unwrap(&self) { ... }
fn unwrap_in_drop(&self) { ... }
}Required Associated Constants§
Required Methods§
Provided Methods§
fn is_success(&self) -> bool
fn unwrap(&self)
Sourcefn unwrap_in_drop(&self)
fn unwrap_in_drop(&self)
Alternative to unwrap that only panics if !std::thread::panicking().
This is useful to avoid double panics in Drop implementations.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.