Struct SyntaxError

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

A SyntaxError is thrown when the JavaScript engine encounters tokens or token order that does not conform to the syntax of the language when parsing code.

MDN documentation

Implementations

impl SyntaxError

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

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

MDN documentation

impl SyntaxError

fn new(message: &str) -> SyntaxError

A SyntaxError is thrown when the JavaScript engine encounters tokens or token order that does not conform to the syntax of the language when parsing code.

MDN documentation

Trait Implementations

impl AsRef<Error> for SyntaxError

fn as_ref(&self) -> &Error

impl AsRef<JsValue> for SyntaxError

fn as_ref(&self) -> &JsValue

impl AsRef<Object> for SyntaxError

fn as_ref(&self) -> &Object

impl AsRef<SyntaxError> for SyntaxError

fn as_ref(&self) -> &SyntaxError

impl Clone for SyntaxError

fn clone(&self) -> Self

impl Debug for SyntaxError

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

impl Deref for SyntaxError

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

impl Eq for SyntaxError

impl ErasableGeneric for SyntaxError

type Repr = JsValue;

impl From<JsValue> for SyntaxError

fn from(obj: JsValue) -> Self

impl FromWasmAbi for SyntaxError

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

impl IntoJsGeneric for SyntaxError where SyntaxError: JsGeneric,

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

impl IntoWasmAbi for SyntaxError

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

impl JsCast for SyntaxError

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

impl LongRefFromWasmAbi for SyntaxError

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

impl OptionFromWasmAbi for SyntaxError

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

impl OptionIntoWasmAbi for SyntaxError

fn none() -> Self::Abi

impl PartialEq for SyntaxError

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

impl Promising for SyntaxError

type Resolution = SyntaxError;

impl RefFromWasmAbi for SyntaxError

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

impl StructuralPartialEq for SyntaxError

impl UpcastFrom<SyntaxError> for SyntaxError

impl WasmDescribe for SyntaxError

fn describe()

Auto Trait Implementations

impl Freeze for SyntaxError

impl RefUnwindSafe for SyntaxError

impl Send for SyntaxError

impl Sync for SyntaxError

impl Unpin for SyntaxError

impl UnsafeUnpin for SyntaxError

impl UnwindSafe for SyntaxError

Blanket Implementations

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

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

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

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

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

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

impl<T> From<T> for SyntaxError

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

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

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

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

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

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

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

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

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

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