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 invalid_zip_structure(message: impl Into<String>) -> Self
pub fn invalid_zip_structure(message: impl Into<String>) -> Self
Construct an error of this class.
Sourcepub fn invalid_xml_structure(message: impl Into<String>) -> Self
pub fn invalid_xml_structure(message: impl Into<String>) -> Self
Construct an error of this class.
Sourcepub fn invalid_package_structure(message: impl Into<String>) -> Self
pub fn invalid_package_structure(message: impl Into<String>) -> Self
Construct an error of this class.
Sourcepub fn invalid_json_structure(message: impl Into<String>) -> Self
pub fn invalid_json_structure(message: impl Into<String>) -> Self
Construct an error of this class.
Sourcepub fn invalid_yaml_structure(message: impl Into<String>) -> Self
pub fn invalid_yaml_structure(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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()