pub struct Fault {
pub during: &'static str,
pub kind: FaultKind,
}Expand description
A failure Henad caught.
Fields§
§during: &'static str§kind: FaultKindKind of failure, with its details.
Implementations§
Source§impl Fault
impl Fault
Sourcepub fn refused(during: &'static str, message: impl Into<String>) -> Self
pub fn refused(during: &'static str, message: impl Into<String>) -> Self
Creates a FaultKind::Refused fault explained by message.
Sourcepub fn device_lost(during: &'static str) -> Self
pub fn device_lost(during: &'static str) -> Self
Creates a fault for a lost device.
Sourcepub fn is_out_of_memory(&self) -> bool
pub fn is_out_of_memory(&self) -> bool
Returns whether the device ran out of memory.
Trait Implementations§
Source§impl Error for Fault
impl Error for Fault
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()
Source§impl From<Fault> for SetupError
impl From<Fault> for SetupError
Auto Trait Implementations§
impl !RefUnwindSafe for Fault
impl !UnwindSafe for Fault
impl Freeze for Fault
impl Send for Fault
impl Sync for Fault
impl Unpin for Fault
impl UnsafeUnpin for Fault
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
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