pub struct JsError { /* private fields */ }Expand description
A JavaScript Error object.
This type is used to create JavaScript Error objects that can be thrown or returned.
Implementations§
Trait Implementations§
Source§impl BatchableResult for JsError
impl BatchableResult for JsError
Source§impl BinaryDecode for JsError
impl BinaryDecode for JsError
fn decode(decoder: &mut DecodedData<'_>) -> Result<Self, DecodeError>
Source§impl BinaryEncode for JsError
impl BinaryEncode for JsError
fn encode(self, encoder: &mut EncodedData)
Source§impl EncodeTypeDef for JsError
impl EncodeTypeDef for JsError
Source§fn encode_type_def(buf: &mut Vec<u8>)
fn encode_type_def(buf: &mut Vec<u8>)
Encode this type’s definition into the buffer.
For primitives, this is just the TypeTag byte.
For callbacks, this includes param count, param types, and return type.
Source§impl JsCast for JsError
impl JsCast for JsError
Source§fn instanceof(val: &JsValue) -> bool
fn instanceof(val: &JsValue) -> bool
Check if a JsValue is an instance of this type. Read more
Source§fn unchecked_from_js(val: JsValue) -> Self
fn unchecked_from_js(val: JsValue) -> Self
Unchecked cast from JsValue to this type. Read more
Source§fn unchecked_from_js_ref(val: &JsValue) -> &Self
fn unchecked_from_js_ref(val: &JsValue) -> &Self
Unchecked cast from a JsValue reference to a reference of this type. Read more
Source§fn is_type_of(val: &JsValue) -> bool
fn is_type_of(val: &JsValue) -> bool
Performs a dynamic type check to see whether the
JsValue provided
is a value of this type. Read moreSource§fn has_type<T>(&self) -> boolwhere
T: JsCast,
fn has_type<T>(&self) -> boolwhere
T: JsCast,
Test whether this JS value has a type
T. Read moreSource§fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
Try to cast this value to type T. Read more
Source§fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
Try to get a reference to type T from this value. Read more
Source§fn is_instance_of<T>(&self) -> boolwhere
T: JsCast,
fn is_instance_of<T>(&self) -> boolwhere
T: JsCast,
Test whether this JS value is an instance of the type
T. Read moreSource§fn unchecked_into<T>(self) -> Twhere
T: JsCast,
fn unchecked_into<T>(self) -> Twhere
T: JsCast,
Unchecked cast to another type.
Source§fn unchecked_ref<T>(&self) -> &Twhere
T: JsCast,
fn unchecked_ref<T>(&self) -> &Twhere
T: JsCast,
Unchecked cast to a reference of another type.
impl UpcastFrom<JsError> for JsError
impl UpcastFrom<JsError> for JsValue
Auto Trait Implementations§
impl Freeze for JsError
impl RefUnwindSafe for JsError
impl Send for JsError
impl Sync for JsError
impl Unpin for JsError
impl UnsafeUnpin for JsError
impl UnwindSafe for JsError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FromWasmAbi for Twhere
T: BinaryDecode + EncodeTypeDef,
impl<T> FromWasmAbi for Twhere
T: BinaryDecode + EncodeTypeDef,
Source§impl<T> IntoWasmAbi for Twhere
T: BinaryEncode + EncodeTypeDef,
impl<T> IntoWasmAbi for Twhere
T: BinaryEncode + EncodeTypeDef,
Source§impl<T> RefFromBinaryDecode for Twhere
T: JsCast + 'static,
impl<T> RefFromBinaryDecode for Twhere
T: JsCast + 'static,
Source§type Anchor = JsCastAnchor<T>
type Anchor = JsCastAnchor<T>
The anchor type that keeps the decoded reference valid.
Source§fn ref_decode(
_decoder: &mut DecodedData<'_>,
) -> Result<<T as RefFromBinaryDecode>::Anchor, DecodeError>
fn ref_decode( _decoder: &mut DecodedData<'_>, ) -> Result<<T as RefFromBinaryDecode>::Anchor, DecodeError>
Decode a reference anchor from binary data.