Struct ErrorOptions

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

The options dictionary accepted as the second argument to the Error constructor (and other built-in error constructors such as AggregateError). Its sole standard property is cause, which indicates the original cause of the error.

MDN documentation

Implementations

impl ErrorOptions

fn get_cause(&self) -> JsValue

The cause property indicates the underlying cause of an error.

MDN documentation

impl ErrorOptions

fn set_cause(&self, cause: &JsValue)

Sets the cause property of this ErrorOptions dictionary.

MDN documentation

impl ErrorOptions

fn new(cause: &JsValue) -> Self

Construct a new ErrorOptions dictionary with the given cause.

Trait Implementations

impl AsRef<ErrorOptions> for ErrorOptions

fn as_ref(&self) -> &ErrorOptions

impl AsRef<JsValue> for ErrorOptions

fn as_ref(&self) -> &JsValue

impl AsRef<Object> for ErrorOptions

fn as_ref(&self) -> &Object

impl Clone for ErrorOptions

fn clone(&self) -> Self

impl Debug for ErrorOptions

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Deref for ErrorOptions

type Target = Object;
fn deref(&self) -> &Object

impl Eq for ErrorOptions

impl ErasableGeneric for ErrorOptions

type Repr = JsValue;

impl From<JsValue> for ErrorOptions

fn from(obj: JsValue) -> Self

impl FromWasmAbi for ErrorOptions

type Abi = <JsValue as FromWasmAbi>::Abi;
unsafe fn from_abi(js: Self::Abi) -> Self

impl IntoJsGeneric for ErrorOptions where ErrorOptions: JsGeneric,

type JsCanon = ErrorOptions;
fn to_js(self) -> ErrorOptions

impl IntoWasmAbi for ErrorOptions

type Abi = <JsValue as IntoWasmAbi>::Abi;
fn into_abi(self) -> Self::Abi

impl JsCast for ErrorOptions

fn instanceof(val: &JsValue) -> bool
fn unchecked_from_js(val: JsValue) -> Self
fn unchecked_from_js_ref(val: &JsValue) -> &Self

impl LongRefFromWasmAbi for ErrorOptions

type Abi = <JsValue as LongRefFromWasmAbi>::Abi;
type Anchor = ErrorOptions;
unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor

impl OptionFromWasmAbi for ErrorOptions

fn is_none(abi: &Self::Abi) -> bool

impl OptionIntoWasmAbi for ErrorOptions

fn none() -> Self::Abi

impl PartialEq for ErrorOptions

fn eq(&self, other: &Self) -> bool

impl Promising for ErrorOptions

type Resolution = ErrorOptions;

impl RefFromWasmAbi for ErrorOptions

type Abi = <JsValue as RefFromWasmAbi>::Abi;
type Anchor = ManuallyDrop<ErrorOptions>;
unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor

impl StructuralPartialEq for ErrorOptions

impl UpcastFrom<ErrorOptions> for ErrorOptions

impl WasmDescribe for ErrorOptions

fn describe()

Auto Trait Implementations

impl Freeze for ErrorOptions

impl RefUnwindSafe for ErrorOptions

impl Send for ErrorOptions

impl Sync for ErrorOptions

impl Unpin for ErrorOptions

impl UnsafeUnpin for ErrorOptions

impl UnwindSafe for ErrorOptions

Blanket Implementations

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

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

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

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

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

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

impl<T> From<T> for ErrorOptions

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

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

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

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

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

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

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

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

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

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