pub struct Failure(/* private fields */);Implementations§
Source§impl Failure
impl Failure
pub fn new(code: FailureKind, cause: impl Into<String>) -> Self
pub fn originate( code: FailureKind, error: &(dyn Error + 'static), origin: Origin, ) -> Self
pub fn find<'a>(error: &'a (dyn Error + 'static)) -> Option<&'a Self>
pub fn code(&self) -> FailureKind
pub fn cause(&self) -> &str
pub fn context(&self) -> &Context
pub fn diagnostics(&self) -> Option<&Diagnostics>
pub fn in_operation(self, operation: impl Into<String>) -> Self
pub fn in_step(self, step: impl Into<String>) -> Self
pub fn without_diagnostics(self) -> Self
pub fn encode(&self) -> Vec<u8> ⓘ
pub fn decode(bytes: &[u8]) -> Result<Self, CodecError>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Failure
impl<'de> Deserialize<'de> for Failure
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Failure
Source§impl Error for Failure
impl Error for Failure
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 StructuralPartialEq for Failure
Auto Trait Implementations§
impl Freeze for Failure
impl RefUnwindSafe for Failure
impl Send for Failure
impl Sync for Failure
impl Unpin for Failure
impl UnsafeUnpin for Failure
impl UnwindSafe for Failure
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