pub struct ErrorMapping {
pub error_categories: BTreeMap<u64, ErrorDescription>,
pub module_error_maps: BTreeMap<ModuleId, BTreeMap<u64, ErrorDescription>>,
}
Fields§
§error_categories: BTreeMap<u64, ErrorDescription>
The set of error categories and their descriptions
module_error_maps: BTreeMap<ModuleId, BTreeMap<u64, ErrorDescription>>
The set of modules, and the module-specific errors
Implementations§
Source§impl ErrorMapping
impl ErrorMapping
pub fn add_error_category( &mut self, category_id: u64, description: ErrorDescription, ) -> Result<()>
pub fn add_module_error( &mut self, module_id: ModuleId, abort_code: u64, description: ErrorDescription, ) -> Result<()>
pub fn from_file<P: AsRef<Path>>(path: P) -> Self
pub fn to_file<P: AsRef<Path>>(&self, path: P)
pub fn get_explanation( &self, module: &ModuleId, output_code: u64, ) -> Option<ErrorContext>
Trait Implementations§
Source§impl Clone for ErrorMapping
impl Clone for ErrorMapping
Source§fn clone(&self) -> ErrorMapping
fn clone(&self) -> ErrorMapping
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ErrorMapping
impl Debug for ErrorMapping
Source§impl Default for ErrorMapping
impl Default for ErrorMapping
Source§impl<'de> Deserialize<'de> for ErrorMapping
impl<'de> Deserialize<'de> for ErrorMapping
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
Auto Trait Implementations§
impl Freeze for ErrorMapping
impl RefUnwindSafe for ErrorMapping
impl Send for ErrorMapping
impl Sync for ErrorMapping
impl Unpin for ErrorMapping
impl UnwindSafe for ErrorMapping
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