pub trait JsErrorClass:
Error
+ Send
+ Sync
+ Any
+ 'static {
// Required methods
fn get_class(&self) -> Cow<'static, str>;
fn get_message(&self) -> Cow<'static, str>;
fn get_additional_properties(&self) -> AdditionalProperties;
fn as_any(&self) -> &dyn Any;
}Expand description
Trait to implement how an error should be represented in JavaScript.
Note:
it is not recommended to manually implement this type, but instead
rather use the JsError macro.
Required Methods§
Sourcefn get_message(&self) -> Cow<'static, str>
fn get_message(&self) -> Cow<'static, str>
Represents the error message used in JavaScript side.
Sourcefn get_additional_properties(&self) -> AdditionalProperties
fn get_additional_properties(&self) -> AdditionalProperties
Additional properties that should be defined on the error in JavaScript side.