pub struct Error { /* private fields */ }Expand description
A typed, classified error.
Implementations§
Source§impl Error
impl Error
Sourcepub fn new(class: ErrorClass, message: impl Into<String>) -> Self
pub fn new(class: ErrorClass, message: impl Into<String>) -> Self
Construct an error of the given class with a human-readable message.
Sourcepub fn class(&self) -> ErrorClass
pub fn class(&self) -> ErrorClass
The failure class.
Source§impl Error
impl Error
Sourcepub fn invalid_container(message: impl Into<String>) -> Self
pub fn invalid_container(message: impl Into<String>) -> Self
Construct an error of this class.
Sourcepub fn unsupported_version(message: impl Into<String>) -> Self
pub fn unsupported_version(message: impl Into<String>) -> Self
Construct an error of this class.
Sourcepub fn unsupported_feature(message: impl Into<String>) -> Self
pub fn unsupported_feature(message: impl Into<String>) -> Self
Construct an error of this class.
Sourcepub fn integrity_mismatch(message: impl Into<String>) -> Self
pub fn integrity_mismatch(message: impl Into<String>) -> Self
Construct an error of this class.
Sourcepub fn resource_limit(message: impl Into<String>) -> Self
pub fn resource_limit(message: impl Into<String>) -> Self
Construct an error of this class.
Sourcepub fn invalid_graph(message: impl Into<String>) -> Self
pub fn invalid_graph(message: impl Into<String>) -> Self
Construct an error of this class.
Sourcepub fn invalid_model(message: impl Into<String>) -> Self
pub fn invalid_model(message: impl Into<String>) -> Self
Construct an error of this class.
Sourcepub fn entropy_decode(message: impl Into<String>) -> Self
pub fn entropy_decode(message: impl Into<String>) -> Self
Construct an error of this class.
Sourcepub fn invalid_pdf_structure(message: impl Into<String>) -> Self
pub fn invalid_pdf_structure(message: impl Into<String>) -> Self
Construct an error of this class.
Sourcepub fn codec_replay(message: impl Into<String>) -> Self
pub fn codec_replay(message: impl Into<String>) -> Self
Construct an error of this class.
Sourcepub fn missing_external_object(message: impl Into<String>) -> Self
pub fn missing_external_object(message: impl Into<String>) -> Self
Construct an error of this class.
Sourcepub fn coverage_violation(message: impl Into<String>) -> Self
pub fn coverage_violation(message: impl Into<String>) -> Self
Construct an error of this class.
Sourcepub fn reconstruction_mismatch(message: impl Into<String>) -> Self
pub fn reconstruction_mismatch(message: impl Into<String>) -> Self
Construct an error of this class.
Sourcepub fn internal_invariant(message: impl Into<String>) -> Self
pub fn internal_invariant(message: impl Into<String>) -> Self
Construct an error of this class.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe 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