pub struct WasmToolkitCommon;Implementations§
Source§impl WasmToolkitCommon
impl WasmToolkitCommon
pub fn stringify(obj: &JsValue) -> WasmToolkitResult<String>
Sourcepub fn exception_or_stringify(error: &JsValue) -> String
pub fn exception_or_stringify(error: &JsValue) -> String
Converts the JsValue error into a string. First checks if the error is a DomException::message first if not try to convert the error using JSON::stringify and if that fails just return an WasmToolkitError::UnableToStringifyJsValue error
pub fn as_dom_exception(error: &JsValue) -> Option<DomException>
pub fn ok_err_as_string(result: WasmToolkitResult<String>) -> String
Auto Trait Implementations§
impl Freeze for WasmToolkitCommon
impl RefUnwindSafe for WasmToolkitCommon
impl Send for WasmToolkitCommon
impl Sync for WasmToolkitCommon
impl Unpin for WasmToolkitCommon
impl UnsafeUnpin for WasmToolkitCommon
impl UnwindSafe for WasmToolkitCommon
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