Struct TypeError

#[repr(transparent)]
pub struct TypeError { /* private fields */ }

The TypeError object represents an error when a value is not of the expected type.

MDN documentation

Implementations

impl TypeError

fn new_with_options(message: &str, options: &ErrorOptions) -> TypeError

Creates a new TypeError with the given message and a typed ErrorOptions dictionary whose cause property indicates the original cause of the error.

MDN documentation

impl TypeError

fn new(message: &str) -> TypeError

The TypeError object represents an error when a value is not of the expected type.

MDN documentation

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) -> bool
fn unchecked_from_js(val: JsValue) -> Self
fn 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()

Auto Trait Implementations

impl Freeze for TypeError

impl RefUnwindSafe for TypeError

impl Send for TypeError

impl Sync for TypeError

impl Unpin for TypeError

impl UnsafeUnpin for TypeError

impl UnwindSafe for TypeError

Blanket Implementations

impl<P, T> Receiver for TypeError where P: Deref<Target = T> + ?Sized, T: ?Sized,

impl<S, T> Upcast<T> for TypeError where T: UpcastFrom<S> + ?Sized, S: ?Sized,

impl<T> Any for TypeError where T: 'static + ?Sized,

impl<T> Borrow<T> for TypeError where T: ?Sized,

impl<T> BorrowMut<T> for TypeError where T: ?Sized,

impl<T> CloneToUninit for TypeError where T: Clone,

impl<T> From<T> for TypeError

impl<T> JsGeneric for TypeError where T: ErasableGeneric<Repr = JsValue> + UpcastFrom<T> + Upcast<JsValue> + JsCast + 'static,

impl<T> ReturnWasmAbi for TypeError where T: IntoWasmAbi,

impl<T> ToOwned for TypeError where T: Clone,

impl<T> TryFromJsValue for TypeError where T: JsCast,

impl<T> VectorFromWasmAbi for TypeError where T: ErasableGeneric<Repr = JsValue> + WasmDescribe,

impl<T> VectorIntoWasmAbi for TypeError where T: ErasableGeneric<Repr = JsValue> + WasmDescribe,

impl<T> VectorRefIntoWasmAbi for TypeError where &'a T: for<'a> Into<JsValue>,

impl<T, U> Into<U> for TypeError where U: From<T>,

impl<T, U> TryFrom<U> for TypeError where U: Into<T>,

impl<T, U> TryInto<U> for TypeError where U: TryFrom<T>,