pub struct Error { /* private fields */ }Implementations§
Source§impl Error
impl Error
pub fn new(kind: ErrorKind, operation: &'static str) -> Self
pub fn with_message(self, message: impl Into<String>) -> Self
pub fn with_operation(self, operation: &'static str) -> Self
pub fn with_context(self, key: &'static str, value: impl ToString) -> Self
pub fn set_source<E>(self, source: E) -> Self
pub fn set_temporary(self) -> Self
pub fn set_permanent(self) -> Self
pub fn set_persistent(self) -> Self
pub fn kind(&self) -> ErrorKind
pub fn status(&self) -> ErrorStatus
pub fn operation(&self) -> &'static str
pub fn message(&self) -> &str
Sourcepub fn context(&self) -> impl ExactSizeIterator<Item = (&'static str, &str)>
pub fn context(&self) -> impl ExactSizeIterator<Item = (&'static str, &str)>
pub fn context_value(&self, key: &str) -> Option<&str>
pub fn is_temporary(&self) -> bool
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + '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()
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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