Struct TypeError
#[repr(transparent)]
pub struct TypeError { /* private fields */ }
The TypeError object represents an error when a value is not of the
expected type.
Implementations
impl TypeError
fn new_with_options(message: &str, options: &ErrorOptions) -> TypeErrorCreates a new
TypeErrorwith the given message and a typedErrorOptionsdictionary whosecauseproperty indicates the original cause of the error.
impl TypeError
fn new(message: &str) -> TypeErrorThe
TypeErrorobject represents an error when a value is not of the expected type.
Trait Implementations
impl AsRef<Error> for TypeError
fn as_ref(&self) -> &Error
impl AsRef<JsValue> for TypeError
fn as_ref(&self) -> &JsValue
impl AsRef<Object> for TypeError
fn as_ref(&self) -> &Object
impl AsRef<TypeError> for TypeError
fn as_ref(&self) -> &TypeError
impl Clone for TypeError
fn clone(&self) -> Self
impl Debug for TypeError
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Deref for TypeError
type Target = Error;fn deref(&self) -> &Error
impl Eq for TypeError
impl ErasableGeneric for TypeError
type Repr = JsValue;
impl From<JsValue> for TypeError
fn from(obj: JsValue) -> Self
impl FromWasmAbi for TypeError
type Abi = <JsValue as FromWasmAbi>::Abi;unsafe fn from_abi(js: Self::Abi) -> Self
impl IntoJsGeneric for TypeError
where
TypeError: JsGeneric,
type JsCanon = TypeError;fn to_js(self) -> TypeError
impl IntoWasmAbi for TypeError
type Abi = <JsValue as IntoWasmAbi>::Abi;fn into_abi(self) -> Self::Abi
impl JsCast for TypeError
fn instanceof(val: &JsValue) -> boolfn unchecked_from_js(val: JsValue) -> Selffn unchecked_from_js_ref(val: &JsValue) -> &Self
impl LongRefFromWasmAbi for TypeError
type Abi = <JsValue as LongRefFromWasmAbi>::Abi;type Anchor = TypeError;unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
impl OptionFromWasmAbi for TypeError
fn is_none(abi: &Self::Abi) -> bool
impl OptionIntoWasmAbi for TypeError
fn none() -> Self::Abi
impl PartialEq for TypeError
fn eq(&self, other: &Self) -> bool
impl Promising for TypeError
type Resolution = TypeError;
impl RefFromWasmAbi for TypeError
type Abi = <JsValue as RefFromWasmAbi>::Abi;type Anchor = ManuallyDrop<TypeError>;unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor
impl StructuralPartialEq for TypeError
impl UpcastFrom<TypeError> for TypeError
impl WasmDescribe for TypeError
fn describe()