pub struct ReadError {
pub kind: ReadErrorKind,
pub backtrace: Backtrace,
}Fields§
§kind: ReadErrorKind§backtrace: BacktraceImplementations§
Source§impl ReadError
impl ReadError
pub fn unimplemented() -> Self
pub fn unknown_key(name: impl Into<Box<str>>) -> Self
pub fn missing_key(name: &'static str) -> Self
pub fn no_variants_matched( errors: impl Into<Box<[(&'static str, ReadError)]>>, ) -> Self
pub fn number_too_big(n: Number) -> Self
pub fn custom(message: impl Into<Box<str>>) -> Self
pub fn while_reading_key(self, key: impl Into<Cow<'static, str>>) -> Self
Trait Implementations§
Source§impl Error for ReadError
impl Error for ReadError
Source§fn provide<'_request>(&'_request self, request: &mut Request<'_request>)
fn provide<'_request>(&'_request self, request: &mut Request<'_request>)
🔬This is a nightly-only experimental API. (
error_generic_member_access)Provides type-based access to context intended for error reports. Read more
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()
Source§impl From<!> for ReadError
impl From<!> for ReadError
Source§fn from(_: Infallible) -> Self
fn from(_: Infallible) -> Self
Converts to this type from the input type.
Source§impl From<ReadErrorKind> for ReadError
impl From<ReadErrorKind> for ReadError
Source§fn from(kind: ReadErrorKind) -> Self
fn from(kind: ReadErrorKind) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for ReadError
impl Forget for ReadError
impl Move for ReadError
impl RefUnwindSafe for ReadErrorwhere
String: RefUnwindSafe,
LazyLock<Capture, impl FnOnce() -> Capture + Send + Sync + UnwindSafe>: RefUnwindSafe,
impl Send for ReadError
impl Sync for ReadError
impl Unpin for ReadError
impl UnsafeUnpin for ReadErrorwhere
*const str is !null: UnsafeUnpin,
PhantomData<str>: UnsafeUnpin,
&'static str: UnsafeUnpin,
*const [(&'static str, ReadError)] is !null: UnsafeUnpin,
PhantomData<[(&'static str, ReadError)]>: UnsafeUnpin,
String: UnsafeUnpin,
*const ReadErrorKind is !null: UnsafeUnpin,
PhantomData<ReadErrorKind>: UnsafeUnpin,
Align4<u32>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<BacktraceFrame>: UnsafeUnpin,
impl FnOnce() -> Capture + Send + Sync + UnwindSafe: UnsafeUnpin,
impl UnwindSafe for ReadErrorwhere
BoxRaw<str>: UnwindSafe,
&'static str: UnwindSafe,
BoxRaw<[(&'static str, ReadError)]>: UnwindSafe,
String: UnwindSafe,
BoxRaw<ReadErrorKind>: UnwindSafe,
LazyLock<Capture, impl FnOnce() -> Capture + Send + Sync + UnwindSafe>: UnwindSafe,
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