#[repr(u8)]pub enum Cause {
Unknown,
OutOfMemory,
OSErr(i32),
}Expand description
The cause of an error.
Variants§
Unknown
The cause is unknown.
This most commonly means an OSErr occurred, but os_err_reporting is
disabled.
OutOfMemory
The allocator ran out of memory.
This should only be used when the allocator runs out of memory and doesn’t grow. Use
OSErr if the system runs out of memory.
OSErr(i32)
The cause is described in the contained OS error.
The error may or may not be accurate depending on the environment.
Trait Implementations§
Source§impl Error for Cause
Available on crate feature std only.
impl Error for Cause
Available on crate feature
std only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
impl Copy for Cause
impl Eq for Cause
impl StructuralPartialEq for Cause
Auto Trait Implementations§
impl Freeze for Cause
impl RefUnwindSafe for Cause
impl Send for Cause
impl Sync for Cause
impl Unpin for Cause
impl UnwindSafe for Cause
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