pub struct ErrorHandler { /* private fields */ }Expand description
WASM bindings for error handling
Implementations§
Source§impl ErrorHandler
impl ErrorHandler
pub fn new() -> Self
Sourcepub fn add_error(&mut self, code: u32, message: &str, severity: u32)
pub fn add_error(&mut self, code: u32, message: &str, severity: u32)
Add an error to the collection
Sourcepub fn has_fatal_errors(&self) -> bool
pub fn has_fatal_errors(&self) -> bool
Check if there are any fatal errors
Sourcepub fn has_errors(&self) -> bool
pub fn has_errors(&self) -> bool
Check if there are any errors
Sourcepub fn error_count(&self) -> usize
pub fn error_count(&self) -> usize
Get error count
Sourcepub fn get_errors_json(&self) -> Result<String, JsValue>
pub fn get_errors_json(&self) -> Result<String, JsValue>
Get all errors as JSON
Trait Implementations§
Source§impl Default for ErrorHandler
impl Default for ErrorHandler
Source§impl From<ErrorHandler> for JsValue
impl From<ErrorHandler> for JsValue
Source§fn from(value: ErrorHandler) -> Self
fn from(value: ErrorHandler) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for ErrorHandler
impl FromWasmAbi for ErrorHandler
Source§impl IntoWasmAbi for ErrorHandler
impl IntoWasmAbi for ErrorHandler
Source§impl LongRefFromWasmAbi for ErrorHandler
impl LongRefFromWasmAbi for ErrorHandler
Source§impl OptionFromWasmAbi for ErrorHandler
impl OptionFromWasmAbi for ErrorHandler
Source§impl OptionIntoWasmAbi for ErrorHandler
impl OptionIntoWasmAbi for ErrorHandler
Source§impl RefFromWasmAbi for ErrorHandler
impl RefFromWasmAbi for ErrorHandler
Source§type Anchor = RcRef<ErrorHandler>
type Anchor = RcRef<ErrorHandler>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for ErrorHandler
impl RefMutFromWasmAbi for ErrorHandler
Source§impl TryFromJsValue for ErrorHandler
impl TryFromJsValue for ErrorHandler
Source§impl VectorFromWasmAbi for ErrorHandler
impl VectorFromWasmAbi for ErrorHandler
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[ErrorHandler]>
Source§impl VectorIntoWasmAbi for ErrorHandler
impl VectorIntoWasmAbi for ErrorHandler
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[ErrorHandler]>) -> Self::Abi
Source§impl WasmDescribeVector for ErrorHandler
impl WasmDescribeVector for ErrorHandler
impl SupportsConstructor for ErrorHandler
impl SupportsInstanceProperty for ErrorHandler
impl SupportsStaticProperty for ErrorHandler
Auto Trait Implementations§
impl Freeze for ErrorHandler
impl RefUnwindSafe for ErrorHandler
impl Send for ErrorHandler
impl Sync for ErrorHandler
impl Unpin for ErrorHandler
impl UnsafeUnpin for ErrorHandler
impl UnwindSafe for ErrorHandler
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
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.