Struct move_core_types::errmap::ErrorMapping
source · 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 copy 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§fn default() -> ErrorMapping
fn default() -> ErrorMapping
Returns the “default value” for a type. Read more
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