Struct diem_sdk::move_types::errmap::ErrorMapping
pub struct ErrorMapping {
pub error_categories: BTreeMap<u64, ErrorDescription, Global>,
pub module_error_maps: BTreeMap<ModuleId, BTreeMap<u64, ErrorDescription, Global>, Global>,
}
Fields§
§error_categories: BTreeMap<u64, ErrorDescription, Global>
The set of error categories and their descriptions
module_error_maps: BTreeMap<ModuleId, BTreeMap<u64, ErrorDescription, Global>, Global>
The set of modules, and the module-specific errors
Implementations§
§impl ErrorMapping
impl ErrorMapping
pub fn add_error_category( &mut self, category_id: u64, description: ErrorDescription ) -> Result<(), Error>
pub fn add_module_error( &mut self, module_id: ModuleId, abort_code: u64, description: ErrorDescription ) -> Result<(), Error>
pub fn from_file<P>(path: P) -> ErrorMappingwhere P: AsRef<Path>,
pub fn to_file<P>(&self, path: P)where P: AsRef<Path>,
pub fn get_explanation( &self, module: &ModuleId, output_code: u64 ) -> Option<ErrorContext>
Trait Implementations§
§impl Clone for ErrorMapping
impl Clone for ErrorMapping
§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 more§impl Debug for ErrorMapping
impl Debug for ErrorMapping
§impl Default for ErrorMapping
impl Default for ErrorMapping
§fn default() -> ErrorMapping
fn default() -> ErrorMapping
Returns the “default value” for a type. Read more
§impl<'de> Deserialize<'de> for ErrorMapping
impl<'de> Deserialize<'de> for ErrorMapping
§fn deserialize<__D>(
__deserializer: __D
) -> Result<ErrorMapping, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<ErrorMapping, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Serialize for ErrorMapping
impl Serialize for ErrorMapping
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> TestOnlyHash for Twhere
T: Serialize + ?Sized,
impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,
§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.