sycamore::web::js_sys::wasm_bindgen

Struct JsValue

source
pub struct JsValue { /* private fields */ }
Expand description

Representation of an object owned by JS.

A JsValue doesn’t actually live in Rust right now but actually in a table owned by the wasm-bindgen generated JS glue code. Eventually the ownership will transfer into Wasm directly and this will likely become more efficient, but for now it may be slightly slow.

Implementations§

source§

impl JsValue

source

pub const NULL: JsValue = _

The null JS value constant.

source

pub const UNDEFINED: JsValue = _

The undefined JS value constant.

source

pub const TRUE: JsValue = _

The true JS value constant.

source

pub const FALSE: JsValue = _

The false JS value constant.

source

pub fn from_str(s: &str) -> JsValue

Creates a new JS value which is a string.

The utf-8 string provided is copied to the JS heap and the string will be owned by the JS garbage collector.

source

pub fn from_f64(n: f64) -> JsValue

Creates a new JS value which is a number.

This function creates a JS value representing a number (a heap allocated number) and returns a handle to the JS version of it.

source

pub fn bigint_from_str(s: &str) -> JsValue

Creates a new JS value which is a bigint from a string representing a number.

This function creates a JS value representing a bigint (a heap allocated large integer) and returns a handle to the JS version of it.

source

pub const fn from_bool(b: bool) -> JsValue

Creates a new JS value which is a boolean.

This function creates a JS object representing a boolean (a heap allocated boolean) and returns a handle to the JS version of it.

source

pub const fn undefined() -> JsValue

Creates a new JS value representing undefined.

source

pub const fn null() -> JsValue

Creates a new JS value representing null.

source

pub fn symbol(description: Option<&str>) -> JsValue

Creates a new JS symbol with the optional description specified.

This function will invoke the Symbol constructor in JS and return the JS object corresponding to the symbol created.

source

pub fn as_f64(&self) -> Option<f64>

Returns the f64 value of this JS value if it’s an instance of a number.

If this JS value is not an instance of a number then this returns None.

source

pub fn is_string(&self) -> bool

Tests whether this JS value is a JS string.

source

pub fn as_string(&self) -> Option<String>

If this JS value is a string value, this function copies the JS string value into Wasm linear memory, encoded as UTF-8, and returns it as a Rust String.

To avoid the copying and re-encoding, consider the JsString::try_from() function from js-sys instead.

If this JS value is not an instance of a string or if it’s not valid utf-8 then this returns None.

§UTF-16 vs UTF-8

JavaScript strings in general are encoded as UTF-16, but Rust strings are encoded as UTF-8. This can cause the Rust string to look a bit different than the JS string sometimes. For more details see the documentation about the str type which contains a few caveats about the encodings.

source

pub fn as_bool(&self) -> Option<bool>

Returns the bool value of this JS value if it’s an instance of a boolean.

If this JS value is not an instance of a boolean then this returns None.

source

pub fn is_null(&self) -> bool

Tests whether this JS value is null

source

pub fn is_undefined(&self) -> bool

Tests whether this JS value is undefined

source

pub fn is_symbol(&self) -> bool

Tests whether the type of this JS value is symbol

source

pub fn is_object(&self) -> bool

Tests whether typeof self == "object" && self !== null.

source

pub fn is_array(&self) -> bool

Tests whether this JS value is an instance of Array.

source

pub fn is_function(&self) -> bool

Tests whether the type of this JS value is function.

source

pub fn is_bigint(&self) -> bool

Tests whether the type of this JS value is bigint.

source

pub fn js_typeof(&self) -> JsValue

Applies the unary typeof JS operator on a JsValue.

MDN documentation

source

pub fn js_in(&self, obj: &JsValue) -> bool

Applies the binary in JS operator on the two JsValues.

MDN documentation

source

pub fn is_truthy(&self) -> bool

Tests whether the value is “truthy”.

source

pub fn is_falsy(&self) -> bool

Tests whether the value is “falsy”.

source

pub fn loose_eq(&self, other: &JsValue) -> bool

Compare two JsValues for equality, using the == operator in JS.

MDN documentation

source

pub fn bit_not(&self) -> JsValue

Applies the unary ~ JS operator on a JsValue.

MDN documentation

source

pub fn unsigned_shr(&self, rhs: &JsValue) -> u32

Applies the binary >>> JS operator on the two JsValues.

MDN documentation

source

pub fn checked_div(&self, rhs: &JsValue) -> JsValue

Applies the binary / JS operator on two JsValues, catching and returning any RangeError thrown.

MDN documentation

source

pub fn pow(&self, rhs: &JsValue) -> JsValue

Applies the binary ** JS operator on the two JsValues.

MDN documentation

source

pub fn lt(&self, other: &JsValue) -> bool

Applies the binary < JS operator on the two JsValues.

MDN documentation

source

pub fn le(&self, other: &JsValue) -> bool

Applies the binary <= JS operator on the two JsValues.

MDN documentation

source

pub fn ge(&self, other: &JsValue) -> bool

Applies the binary >= JS operator on the two JsValues.

MDN documentation

source

pub fn gt(&self, other: &JsValue) -> bool

Applies the binary > JS operator on the two JsValues.

MDN documentation

source

pub fn unchecked_into_f64(&self) -> f64

Applies the unary + JS operator on a JsValue. Can throw.

MDN documentation

Trait Implementations§

source§

impl Add<&JsValue> for JsValue

source§

type Output = <&'static JsValue as Add>::Output

The resulting type after applying the + operator.
source§

fn add(self, other: &JsValue) -> <&'static JsValue as Add>::Output

Performs the + operation. Read more
source§

impl<'a> Add<JsValue> for &'a JsValue

source§

type Output = <&'static JsValue as Add>::Output

The resulting type after applying the + operator.
source§

fn add(self, other: JsValue) -> <&'static JsValue as Add>::Output

Performs the + operation. Read more
source§

impl Add for &JsValue

source§

fn add(self, rhs: &JsValue) -> <&JsValue as Add>::Output

Applies the binary + JS operator on two JsValues.

MDN documentation

source§

type Output = JsValue

The resulting type after applying the + operator.
source§

impl Add for JsValue

source§

type Output = <&'static JsValue as Add>::Output

The resulting type after applying the + operator.
source§

fn add(self, other: JsValue) -> <&'static JsValue as Add>::Output

Performs the + operation. Read more
source§

impl AsRef<JsValue> for AnimationEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Array

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for ArrayBuffer

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for AsyncIterator

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for BeforeUnloadEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for BigInt

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for BigInt64Array

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for BigUint64Array

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Boolean

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for CharacterData

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T> AsRef<JsValue> for Closure<T>
where T: ?Sized,

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Collator

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Comment

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for CompileError

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for CompositionEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for DataView

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Date

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for DateTimeFormat

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for DeviceMotionEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for DeviceOrientationEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Document

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for DocumentFragment

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for DragEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Element

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Error

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for ErrorEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for EvalError

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Event

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for EventListener

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for EventTarget

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Exception

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Float32Array

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Float64Array

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for FocusEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Function

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for GamepadEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Generator

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Global

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for HashChangeEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for HtmlElement

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for InputEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Instance

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Int16Array

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Int32Array

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Int8Array

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Iterator

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for IteratorNext

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for JsString

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for JsValue

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for KeyboardEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for LinkError

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Map

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Memory

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for MessageEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Module

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for MouseEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Node

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for NodeList

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Number

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for NumberFormat

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Object

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for PageTransitionEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for PluralRules

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for PointerEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for PopStateEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for ProgressEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Promise

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for PromiseRejectionEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Proxy

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for RangeError

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for ReferenceError

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for RegExp

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for RelativeTimeFormat

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for RuntimeError

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for SecurityPolicyViolationEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Set

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for SharedArrayBuffer

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for StorageEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for SubmitEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Symbol

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for SyntaxError

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Table

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Tag

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Text

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for TouchEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for TransitionEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for TypeError

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for UiEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Uint16Array

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Uint32Array

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Uint8Array

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Uint8ClampedArray

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for UriError

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for WeakMap

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for WeakSet

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for WheelEvent

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<JsValue> for Window

source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl BitAnd<&JsValue> for JsValue

source§

type Output = <&'static JsValue as BitAnd>::Output

The resulting type after applying the & operator.
source§

fn bitand(self, other: &JsValue) -> <&'static JsValue as BitAnd>::Output

Performs the & operation. Read more
source§

impl<'a> BitAnd<JsValue> for &'a JsValue

source§

type Output = <&'static JsValue as BitAnd>::Output

The resulting type after applying the & operator.
source§

fn bitand(self, other: JsValue) -> <&'static JsValue as BitAnd>::Output

Performs the & operation. Read more
source§

impl BitAnd for &JsValue

source§

fn bitand(self, rhs: &JsValue) -> <&JsValue as BitAnd>::Output

Applies the binary & JS operator on two JsValues.

MDN documentation

source§

type Output = JsValue

The resulting type after applying the & operator.
source§

impl BitAnd for JsValue

source§

type Output = <&'static JsValue as BitAnd>::Output

The resulting type after applying the & operator.
source§

fn bitand(self, other: JsValue) -> <&'static JsValue as BitAnd>::Output

Performs the & operation. Read more
source§

impl BitOr<&JsValue> for JsValue

source§

type Output = <&'static JsValue as BitOr>::Output

The resulting type after applying the | operator.
source§

fn bitor(self, other: &JsValue) -> <&'static JsValue as BitOr>::Output

Performs the | operation. Read more
source§

impl<'a> BitOr<JsValue> for &'a JsValue

source§

type Output = <&'static JsValue as BitOr>::Output

The resulting type after applying the | operator.
source§

fn bitor(self, other: JsValue) -> <&'static JsValue as BitOr>::Output

Performs the | operation. Read more
source§

impl BitOr for &JsValue

source§

fn bitor(self, rhs: &JsValue) -> <&JsValue as BitOr>::Output

Applies the binary | JS operator on two JsValues.

MDN documentation

source§

type Output = JsValue

The resulting type after applying the | operator.
source§

impl BitOr for JsValue

source§

type Output = <&'static JsValue as BitOr>::Output

The resulting type after applying the | operator.
source§

fn bitor(self, other: JsValue) -> <&'static JsValue as BitOr>::Output

Performs the | operation. Read more
source§

impl BitXor<&JsValue> for JsValue

source§

type Output = <&'static JsValue as BitXor>::Output

The resulting type after applying the ^ operator.
source§

fn bitxor(self, other: &JsValue) -> <&'static JsValue as BitXor>::Output

Performs the ^ operation. Read more
source§

impl<'a> BitXor<JsValue> for &'a JsValue

source§

type Output = <&'static JsValue as BitXor>::Output

The resulting type after applying the ^ operator.
source§

fn bitxor(self, other: JsValue) -> <&'static JsValue as BitXor>::Output

Performs the ^ operation. Read more
source§

impl BitXor for &JsValue

source§

fn bitxor(self, rhs: &JsValue) -> <&JsValue as BitXor>::Output

Applies the binary ^ JS operator on two JsValues.

MDN documentation

source§

type Output = JsValue

The resulting type after applying the ^ operator.
source§

impl BitXor for JsValue

source§

type Output = <&'static JsValue as BitXor>::Output

The resulting type after applying the ^ operator.
source§

fn bitxor(self, other: JsValue) -> <&'static JsValue as BitXor>::Output

Performs the ^ operation. Read more
source§

impl Clone for JsValue

source§

fn clone(&self) -> JsValue

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for JsValue

source§

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

Formats the value using the given formatter. Read more
source§

impl Default for JsValue

source§

fn default() -> JsValue

Returns the “default value” for a type. Read more
source§

impl Div<&JsValue> for JsValue

source§

type Output = <&'static JsValue as Div>::Output

The resulting type after applying the / operator.
source§

fn div(self, other: &JsValue) -> <&'static JsValue as Div>::Output

Performs the / operation. Read more
source§

impl<'a> Div<JsValue> for &'a JsValue

source§

type Output = <&'static JsValue as Div>::Output

The resulting type after applying the / operator.
source§

fn div(self, other: JsValue) -> <&'static JsValue as Div>::Output

Performs the / operation. Read more
source§

impl Div for &JsValue

source§

fn div(self, rhs: &JsValue) -> <&JsValue as Div>::Output

Applies the binary / JS operator on two JsValues.

MDN documentation

source§

type Output = JsValue

The resulting type after applying the / operator.
source§

impl Div for JsValue

source§

type Output = <&'static JsValue as Div>::Output

The resulting type after applying the / operator.
source§

fn div(self, other: JsValue) -> <&'static JsValue as Div>::Output

Performs the / operation. Read more
source§

impl Drop for JsValue

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<'a> From<&'a String> for JsValue

source§

fn from(s: &'a String) -> JsValue

Converts to this type from the input type.
source§

impl<'a, T> From<&'a T> for JsValue
where T: JsCast,

source§

fn from(s: &'a T) -> JsValue

Converts to this type from the input type.
source§

impl<'a> From<&'a str> for JsValue

source§

fn from(s: &'a str) -> JsValue

Converts to this type from the input type.
source§

impl<T> From<*const T> for JsValue

source§

fn from(s: *const T) -> JsValue

Converts to this type from the input type.
source§

impl<T> From<*mut T> for JsValue

source§

fn from(s: *mut T) -> JsValue

Converts to this type from the input type.
source§

impl From<AnimationEvent> for JsValue

source§

fn from(obj: AnimationEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<Array> for JsValue

source§

fn from(obj: Array) -> JsValue

Converts to this type from the input type.
source§

impl From<ArrayBuffer> for JsValue

source§

fn from(obj: ArrayBuffer) -> JsValue

Converts to this type from the input type.
source§

impl From<AsyncIterator> for JsValue

source§

fn from(obj: AsyncIterator) -> JsValue

Converts to this type from the input type.
source§

impl From<BeforeUnloadEvent> for JsValue

source§

fn from(obj: BeforeUnloadEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<BigInt> for JsValue

source§

fn from(obj: BigInt) -> JsValue

Converts to this type from the input type.
source§

impl From<BigInt64Array> for JsValue

source§

fn from(obj: BigInt64Array) -> JsValue

Converts to this type from the input type.
source§

impl From<BigUint64Array> for JsValue

source§

fn from(obj: BigUint64Array) -> JsValue

Converts to this type from the input type.
source§

impl From<Boolean> for JsValue

source§

fn from(obj: Boolean) -> JsValue

Converts to this type from the input type.
source§

impl<T> From<Box<[T]>> for JsValue
where T: VectorIntoJsValue,

source§

fn from(vector: Box<[T]>) -> JsValue

Converts to this type from the input type.
source§

impl From<Box<[f32]>> for JsValue

source§

fn from(vector: Box<[f32]>) -> JsValue

Converts to this type from the input type.
source§

impl From<Box<[f64]>> for JsValue

source§

fn from(vector: Box<[f64]>) -> JsValue

Converts to this type from the input type.
source§

impl From<Box<[i16]>> for JsValue

source§

fn from(vector: Box<[i16]>) -> JsValue

Converts to this type from the input type.
source§

impl From<Box<[i32]>> for JsValue

source§

fn from(vector: Box<[i32]>) -> JsValue

Converts to this type from the input type.
source§

impl From<Box<[i64]>> for JsValue

source§

fn from(vector: Box<[i64]>) -> JsValue

Converts to this type from the input type.
source§

impl From<Box<[i8]>> for JsValue

source§

fn from(vector: Box<[i8]>) -> JsValue

Converts to this type from the input type.
source§

impl From<Box<[u16]>> for JsValue

source§

fn from(vector: Box<[u16]>) -> JsValue

Converts to this type from the input type.
source§

impl From<Box<[u32]>> for JsValue

source§

fn from(vector: Box<[u32]>) -> JsValue

Converts to this type from the input type.
source§

impl From<Box<[u64]>> for JsValue

source§

fn from(vector: Box<[u64]>) -> JsValue

Converts to this type from the input type.
source§

impl From<Box<[u8]>> for JsValue

source§

fn from(vector: Box<[u8]>) -> JsValue

Converts to this type from the input type.
source§

impl From<CharacterData> for JsValue

source§

fn from(obj: CharacterData) -> JsValue

Converts to this type from the input type.
source§

impl From<Clamped<Box<[f32]>>> for JsValue

source§

fn from(vector: Clamped<Box<[f32]>>) -> JsValue

Converts to this type from the input type.
source§

impl From<Clamped<Box<[f64]>>> for JsValue

source§

fn from(vector: Clamped<Box<[f64]>>) -> JsValue

Converts to this type from the input type.
source§

impl From<Clamped<Box<[i16]>>> for JsValue

source§

fn from(vector: Clamped<Box<[i16]>>) -> JsValue

Converts to this type from the input type.
source§

impl From<Clamped<Box<[i32]>>> for JsValue

source§

fn from(vector: Clamped<Box<[i32]>>) -> JsValue

Converts to this type from the input type.
source§

impl From<Clamped<Box<[i64]>>> for JsValue

source§

fn from(vector: Clamped<Box<[i64]>>) -> JsValue

Converts to this type from the input type.
source§

impl From<Clamped<Box<[i8]>>> for JsValue

source§

fn from(vector: Clamped<Box<[i8]>>) -> JsValue

Converts to this type from the input type.
source§

impl From<Clamped<Box<[u16]>>> for JsValue

source§

fn from(vector: Clamped<Box<[u16]>>) -> JsValue

Converts to this type from the input type.
source§

impl From<Clamped<Box<[u32]>>> for JsValue

source§

fn from(vector: Clamped<Box<[u32]>>) -> JsValue

Converts to this type from the input type.
source§

impl From<Clamped<Box<[u64]>>> for JsValue

source§

fn from(vector: Clamped<Box<[u64]>>) -> JsValue

Converts to this type from the input type.
source§

impl From<Clamped<Box<[u8]>>> for JsValue

source§

fn from(vector: Clamped<Box<[u8]>>) -> JsValue

Converts to this type from the input type.
source§

impl<T> From<Clamped<Vec<T>>> for JsValue

source§

fn from(vector: Clamped<Vec<T>>) -> JsValue

Converts to this type from the input type.
source§

impl From<Collator> for JsValue

source§

fn from(obj: Collator) -> JsValue

Converts to this type from the input type.
source§

impl From<Comment> for JsValue

source§

fn from(obj: Comment) -> JsValue

Converts to this type from the input type.
source§

impl From<CompileError> for JsValue

source§

fn from(obj: CompileError) -> JsValue

Converts to this type from the input type.
source§

impl From<CompositionEvent> for JsValue

source§

fn from(obj: CompositionEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<DataView> for JsValue

source§

fn from(obj: DataView) -> JsValue

Converts to this type from the input type.
source§

impl From<Date> for JsValue

source§

fn from(obj: Date) -> JsValue

Converts to this type from the input type.
source§

impl From<DateTimeFormat> for JsValue

source§

fn from(obj: DateTimeFormat) -> JsValue

Converts to this type from the input type.
source§

impl From<DeviceMotionEvent> for JsValue

source§

fn from(obj: DeviceMotionEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<DeviceOrientationEvent> for JsValue

source§

fn from(obj: DeviceOrientationEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<Document> for JsValue

source§

fn from(obj: Document) -> JsValue

Converts to this type from the input type.
source§

impl From<DocumentFragment> for JsValue

source§

fn from(obj: DocumentFragment) -> JsValue

Converts to this type from the input type.
source§

impl From<DragEvent> for JsValue

source§

fn from(obj: DragEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<Element> for JsValue

source§

fn from(obj: Element) -> JsValue

Converts to this type from the input type.
source§

impl From<Error> for JsValue

source§

fn from(obj: Error) -> JsValue

Converts to this type from the input type.
source§

impl From<ErrorEvent> for JsValue

source§

fn from(obj: ErrorEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<EvalError> for JsValue

source§

fn from(obj: EvalError) -> JsValue

Converts to this type from the input type.
source§

impl From<Event> for JsValue

source§

fn from(obj: Event) -> JsValue

Converts to this type from the input type.
source§

impl From<EventListener> for JsValue

source§

fn from(obj: EventListener) -> JsValue

Converts to this type from the input type.
source§

impl From<EventTarget> for JsValue

source§

fn from(obj: EventTarget) -> JsValue

Converts to this type from the input type.
source§

impl From<Exception> for JsValue

source§

fn from(obj: Exception) -> JsValue

Converts to this type from the input type.
source§

impl From<Float32Array> for JsValue

source§

fn from(obj: Float32Array) -> JsValue

Converts to this type from the input type.
source§

impl From<Float64Array> for JsValue

source§

fn from(obj: Float64Array) -> JsValue

Converts to this type from the input type.
source§

impl From<FocusEvent> for JsValue

source§

fn from(obj: FocusEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<Function> for JsValue

source§

fn from(obj: Function) -> JsValue

Converts to this type from the input type.
source§

impl From<GamepadEvent> for JsValue

source§

fn from(obj: GamepadEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<Generator> for JsValue

source§

fn from(obj: Generator) -> JsValue

Converts to this type from the input type.
source§

impl From<Global> for JsValue

source§

fn from(obj: Global) -> JsValue

Converts to this type from the input type.
source§

impl From<Global> for JsValue

source§

fn from(obj: Global) -> JsValue

Converts to this type from the input type.
source§

impl From<HashChangeEvent> for JsValue

source§

fn from(obj: HashChangeEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<HtmlElement> for JsValue

source§

fn from(obj: HtmlElement) -> JsValue

Converts to this type from the input type.
source§

impl From<InputEvent> for JsValue

source§

fn from(obj: InputEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<Instance> for JsValue

source§

fn from(obj: Instance) -> JsValue

Converts to this type from the input type.
source§

impl From<Int16Array> for JsValue

source§

fn from(obj: Int16Array) -> JsValue

Converts to this type from the input type.
source§

impl From<Int32Array> for JsValue

source§

fn from(obj: Int32Array) -> JsValue

Converts to this type from the input type.
source§

impl From<Int8Array> for JsValue

source§

fn from(obj: Int8Array) -> JsValue

Converts to this type from the input type.
source§

impl From<Iterator> for JsValue

source§

fn from(obj: Iterator) -> JsValue

Converts to this type from the input type.
source§

impl From<IteratorNext> for JsValue

source§

fn from(obj: IteratorNext) -> JsValue

Converts to this type from the input type.
source§

impl From<JsError> for JsValue

source§

fn from(error: JsError) -> JsValue

Converts to this type from the input type.
source§

impl From<JsString> for JsValue

source§

fn from(obj: JsString) -> JsValue

Converts to this type from the input type.
source§

impl From<JsValue> for AnimationEvent

source§

fn from(obj: JsValue) -> AnimationEvent

Converts to this type from the input type.
source§

impl From<JsValue> for Array

source§

fn from(obj: JsValue) -> Array

Converts to this type from the input type.
source§

impl From<JsValue> for ArrayBuffer

source§

fn from(obj: JsValue) -> ArrayBuffer

Converts to this type from the input type.
source§

impl From<JsValue> for AsyncIterator

source§

fn from(obj: JsValue) -> AsyncIterator

Converts to this type from the input type.
source§

impl From<JsValue> for BeforeUnloadEvent

source§

fn from(obj: JsValue) -> BeforeUnloadEvent

Converts to this type from the input type.
source§

impl From<JsValue> for BigInt

source§

fn from(obj: JsValue) -> BigInt

Converts to this type from the input type.
source§

impl From<JsValue> for BigInt64Array

source§

fn from(obj: JsValue) -> BigInt64Array

Converts to this type from the input type.
source§

impl From<JsValue> for BigUint64Array

source§

fn from(obj: JsValue) -> BigUint64Array

Converts to this type from the input type.
source§

impl From<JsValue> for Boolean

source§

fn from(obj: JsValue) -> Boolean

Converts to this type from the input type.
source§

impl From<JsValue> for CharacterData

source§

fn from(obj: JsValue) -> CharacterData

Converts to this type from the input type.
source§

impl From<JsValue> for Collator

source§

fn from(obj: JsValue) -> Collator

Converts to this type from the input type.
source§

impl From<JsValue> for Comment

source§

fn from(obj: JsValue) -> Comment

Converts to this type from the input type.
source§

impl From<JsValue> for CompileError

source§

fn from(obj: JsValue) -> CompileError

Converts to this type from the input type.
source§

impl From<JsValue> for CompositionEvent

source§

fn from(obj: JsValue) -> CompositionEvent

Converts to this type from the input type.
source§

impl From<JsValue> for DataView

source§

fn from(obj: JsValue) -> DataView

Converts to this type from the input type.
source§

impl From<JsValue> for Date

source§

fn from(obj: JsValue) -> Date

Converts to this type from the input type.
source§

impl From<JsValue> for DateTimeFormat

source§

fn from(obj: JsValue) -> DateTimeFormat

Converts to this type from the input type.
source§

impl From<JsValue> for DeviceMotionEvent

source§

fn from(obj: JsValue) -> DeviceMotionEvent

Converts to this type from the input type.
source§

impl From<JsValue> for DeviceOrientationEvent

source§

fn from(obj: JsValue) -> DeviceOrientationEvent

Converts to this type from the input type.
source§

impl From<JsValue> for Document

source§

fn from(obj: JsValue) -> Document

Converts to this type from the input type.
source§

impl From<JsValue> for DocumentFragment

source§

fn from(obj: JsValue) -> DocumentFragment

Converts to this type from the input type.
source§

impl From<JsValue> for DragEvent

source§

fn from(obj: JsValue) -> DragEvent

Converts to this type from the input type.
source§

impl From<JsValue> for Element

source§

fn from(obj: JsValue) -> Element

Converts to this type from the input type.
source§

impl From<JsValue> for Error

source§

fn from(obj: JsValue) -> Error

Converts to this type from the input type.
source§

impl From<JsValue> for ErrorEvent

source§

fn from(obj: JsValue) -> ErrorEvent

Converts to this type from the input type.
source§

impl From<JsValue> for EvalError

source§

fn from(obj: JsValue) -> EvalError

Converts to this type from the input type.
source§

impl From<JsValue> for Event

source§

fn from(obj: JsValue) -> Event

Converts to this type from the input type.
source§

impl From<JsValue> for EventListener

source§

fn from(obj: JsValue) -> EventListener

Converts to this type from the input type.
source§

impl From<JsValue> for EventTarget

source§

fn from(obj: JsValue) -> EventTarget

Converts to this type from the input type.
source§

impl From<JsValue> for Exception

source§

fn from(obj: JsValue) -> Exception

Converts to this type from the input type.
source§

impl From<JsValue> for Float32Array

source§

fn from(obj: JsValue) -> Float32Array

Converts to this type from the input type.
source§

impl From<JsValue> for Float64Array

source§

fn from(obj: JsValue) -> Float64Array

Converts to this type from the input type.
source§

impl From<JsValue> for FocusEvent

source§

fn from(obj: JsValue) -> FocusEvent

Converts to this type from the input type.
source§

impl From<JsValue> for Function

source§

fn from(obj: JsValue) -> Function

Converts to this type from the input type.
source§

impl From<JsValue> for GamepadEvent

source§

fn from(obj: JsValue) -> GamepadEvent

Converts to this type from the input type.
source§

impl From<JsValue> for Generator

source§

fn from(obj: JsValue) -> Generator

Converts to this type from the input type.
source§

impl From<JsValue> for Global

source§

fn from(obj: JsValue) -> Global

Converts to this type from the input type.
source§

impl From<JsValue> for HashChangeEvent

source§

fn from(obj: JsValue) -> HashChangeEvent

Converts to this type from the input type.
source§

impl From<JsValue> for HtmlElement

source§

fn from(obj: JsValue) -> HtmlElement

Converts to this type from the input type.
source§

impl From<JsValue> for InputEvent

source§

fn from(obj: JsValue) -> InputEvent

Converts to this type from the input type.
source§

impl From<JsValue> for Instance

source§

fn from(obj: JsValue) -> Instance

Converts to this type from the input type.
source§

impl From<JsValue> for Int16Array

source§

fn from(obj: JsValue) -> Int16Array

Converts to this type from the input type.
source§

impl From<JsValue> for Int32Array

source§

fn from(obj: JsValue) -> Int32Array

Converts to this type from the input type.
source§

impl From<JsValue> for Int8Array

source§

fn from(obj: JsValue) -> Int8Array

Converts to this type from the input type.
source§

impl From<JsValue> for Iterator

source§

fn from(obj: JsValue) -> Iterator

Converts to this type from the input type.
source§

impl From<JsValue> for IteratorNext

source§

fn from(obj: JsValue) -> IteratorNext

Converts to this type from the input type.
source§

impl From<JsValue> for JsString

source§

fn from(obj: JsValue) -> JsString

Converts to this type from the input type.
source§

impl From<JsValue> for KeyboardEvent

source§

fn from(obj: JsValue) -> KeyboardEvent

Converts to this type from the input type.
source§

impl From<JsValue> for LinkError

source§

fn from(obj: JsValue) -> LinkError

Converts to this type from the input type.
source§

impl From<JsValue> for Map

source§

fn from(obj: JsValue) -> Map

Converts to this type from the input type.
§

impl From<JsValue> for MaybeDyn<JsValue>

§

fn from(val: JsValue) -> MaybeDyn<JsValue>

Converts to this type from the input type.
source§

impl From<JsValue> for Memory

source§

fn from(obj: JsValue) -> Memory

Converts to this type from the input type.
source§

impl From<JsValue> for MessageEvent

source§

fn from(obj: JsValue) -> MessageEvent

Converts to this type from the input type.
source§

impl From<JsValue> for Module

source§

fn from(obj: JsValue) -> Module

Converts to this type from the input type.
source§

impl From<JsValue> for MouseEvent

source§

fn from(obj: JsValue) -> MouseEvent

Converts to this type from the input type.
source§

impl From<JsValue> for Node

source§

fn from(obj: JsValue) -> Node

Converts to this type from the input type.
source§

impl From<JsValue> for NodeList

source§

fn from(obj: JsValue) -> NodeList

Converts to this type from the input type.
source§

impl From<JsValue> for Number

source§

fn from(obj: JsValue) -> Number

Converts to this type from the input type.
source§

impl From<JsValue> for NumberFormat

source§

fn from(obj: JsValue) -> NumberFormat

Converts to this type from the input type.
source§

impl From<JsValue> for Object

source§

fn from(obj: JsValue) -> Object

Converts to this type from the input type.
source§

impl From<JsValue> for PageTransitionEvent

source§

fn from(obj: JsValue) -> PageTransitionEvent

Converts to this type from the input type.
source§

impl From<JsValue> for PluralRules

source§

fn from(obj: JsValue) -> PluralRules

Converts to this type from the input type.
source§

impl From<JsValue> for PointerEvent

source§

fn from(obj: JsValue) -> PointerEvent

Converts to this type from the input type.
source§

impl From<JsValue> for PopStateEvent

source§

fn from(obj: JsValue) -> PopStateEvent

Converts to this type from the input type.
source§

impl From<JsValue> for ProgressEvent

source§

fn from(obj: JsValue) -> ProgressEvent

Converts to this type from the input type.
source§

impl From<JsValue> for Promise

source§

fn from(obj: JsValue) -> Promise

Converts to this type from the input type.
source§

impl From<JsValue> for PromiseRejectionEvent

source§

fn from(obj: JsValue) -> PromiseRejectionEvent

Converts to this type from the input type.
source§

impl From<JsValue> for Proxy

source§

fn from(obj: JsValue) -> Proxy

Converts to this type from the input type.
source§

impl From<JsValue> for RangeError

source§

fn from(obj: JsValue) -> RangeError

Converts to this type from the input type.
source§

impl From<JsValue> for ReferenceError

source§

fn from(obj: JsValue) -> ReferenceError

Converts to this type from the input type.
source§

impl From<JsValue> for RegExp

source§

fn from(obj: JsValue) -> RegExp

Converts to this type from the input type.
source§

impl From<JsValue> for RelativeTimeFormat

source§

fn from(obj: JsValue) -> RelativeTimeFormat

Converts to this type from the input type.
source§

impl From<JsValue> for RuntimeError

source§

fn from(obj: JsValue) -> RuntimeError

Converts to this type from the input type.
source§

impl From<JsValue> for SecurityPolicyViolationEvent

source§

fn from(obj: JsValue) -> SecurityPolicyViolationEvent

Converts to this type from the input type.
source§

impl From<JsValue> for Set

source§

fn from(obj: JsValue) -> Set

Converts to this type from the input type.
source§

impl From<JsValue> for SharedArrayBuffer

source§

fn from(obj: JsValue) -> SharedArrayBuffer

Converts to this type from the input type.
source§

impl From<JsValue> for StorageEvent

source§

fn from(obj: JsValue) -> StorageEvent

Converts to this type from the input type.
source§

impl From<JsValue> for SubmitEvent

source§

fn from(obj: JsValue) -> SubmitEvent

Converts to this type from the input type.
source§

impl From<JsValue> for Symbol

source§

fn from(obj: JsValue) -> Symbol

Converts to this type from the input type.
source§

impl From<JsValue> for SyntaxError

source§

fn from(obj: JsValue) -> SyntaxError

Converts to this type from the input type.
source§

impl From<JsValue> for Table

source§

fn from(obj: JsValue) -> Table

Converts to this type from the input type.
source§

impl From<JsValue> for Tag

source§

fn from(obj: JsValue) -> Tag

Converts to this type from the input type.
source§

impl From<JsValue> for Text

source§

fn from(obj: JsValue) -> Text

Converts to this type from the input type.
source§

impl From<JsValue> for TouchEvent

source§

fn from(obj: JsValue) -> TouchEvent

Converts to this type from the input type.
source§

impl From<JsValue> for TransitionEvent

source§

fn from(obj: JsValue) -> TransitionEvent

Converts to this type from the input type.
source§

impl From<JsValue> for TypeError

source§

fn from(obj: JsValue) -> TypeError

Converts to this type from the input type.
source§

impl From<JsValue> for UiEvent

source§

fn from(obj: JsValue) -> UiEvent

Converts to this type from the input type.
source§

impl From<JsValue> for Uint16Array

source§

fn from(obj: JsValue) -> Uint16Array

Converts to this type from the input type.
source§

impl From<JsValue> for Uint32Array

source§

fn from(obj: JsValue) -> Uint32Array

Converts to this type from the input type.
source§

impl From<JsValue> for Uint8Array

source§

fn from(obj: JsValue) -> Uint8Array

Converts to this type from the input type.
source§

impl From<JsValue> for Uint8ClampedArray

source§

fn from(obj: JsValue) -> Uint8ClampedArray

Converts to this type from the input type.
source§

impl From<JsValue> for UriError

source§

fn from(obj: JsValue) -> UriError

Converts to this type from the input type.
source§

impl From<JsValue> for WeakMap

source§

fn from(obj: JsValue) -> WeakMap

Converts to this type from the input type.
source§

impl From<JsValue> for WeakSet

source§

fn from(obj: JsValue) -> WeakSet

Converts to this type from the input type.
source§

impl From<JsValue> for WheelEvent

source§

fn from(obj: JsValue) -> WheelEvent

Converts to this type from the input type.
source§

impl From<JsValue> for Window

source§

fn from(obj: JsValue) -> Window

Converts to this type from the input type.
source§

impl From<KeyboardEvent> for JsValue

source§

fn from(obj: KeyboardEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<LinkError> for JsValue

source§

fn from(obj: LinkError) -> JsValue

Converts to this type from the input type.
source§

impl From<Map> for JsValue

source§

fn from(obj: Map) -> JsValue

Converts to this type from the input type.
source§

impl From<MaybeIterator> for JsValue

source§

fn from(obj: MaybeIterator) -> JsValue

Converts to this type from the input type.
source§

impl From<Memory> for JsValue

source§

fn from(obj: Memory) -> JsValue

Converts to this type from the input type.
source§

impl From<MessageEvent> for JsValue

source§

fn from(obj: MessageEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<Module> for JsValue

source§

fn from(obj: Module) -> JsValue

Converts to this type from the input type.
source§

impl From<MouseEvent> for JsValue

source§

fn from(obj: MouseEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<Node> for JsValue

source§

fn from(obj: Node) -> JsValue

Converts to this type from the input type.
source§

impl From<NodeList> for JsValue

source§

fn from(obj: NodeList) -> JsValue

Converts to this type from the input type.
§

impl From<NodeWithId> for JsValue

§

fn from(obj: NodeWithId) -> JsValue

Converts to this type from the input type.
source§

impl<T> From<NonNull<T>> for JsValue

source§

fn from(s: NonNull<T>) -> JsValue

Converts to this type from the input type.
source§

impl From<Number> for JsValue

source§

fn from(obj: Number) -> JsValue

Converts to this type from the input type.
source§

impl From<NumberFormat> for JsValue

source§

fn from(obj: NumberFormat) -> JsValue

Converts to this type from the input type.
source§

impl From<Object> for JsValue

source§

fn from(obj: Object) -> JsValue

Converts to this type from the input type.
source§

impl<T> From<Option<T>> for JsValue
where JsValue: From<T>,

source§

fn from(s: Option<T>) -> JsValue

Converts to this type from the input type.
source§

impl From<PageTransitionEvent> for JsValue

source§

fn from(obj: PageTransitionEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<PluralRules> for JsValue

source§

fn from(obj: PluralRules) -> JsValue

Converts to this type from the input type.
source§

impl From<PointerEvent> for JsValue

source§

fn from(obj: PointerEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<PopStateEvent> for JsValue

source§

fn from(obj: PopStateEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<ProgressEvent> for JsValue

source§

fn from(obj: ProgressEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<Promise> for JsValue

source§

fn from(obj: Promise) -> JsValue

Converts to this type from the input type.
source§

impl From<PromiseRejectionEvent> for JsValue

source§

fn from(obj: PromiseRejectionEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<Proxy> for JsValue

source§

fn from(obj: Proxy) -> JsValue

Converts to this type from the input type.
source§

impl From<RangeError> for JsValue

source§

fn from(obj: RangeError) -> JsValue

Converts to this type from the input type.
source§

impl From<ReferenceError> for JsValue

source§

fn from(obj: ReferenceError) -> JsValue

Converts to this type from the input type.
source§

impl From<RegExp> for JsValue

source§

fn from(obj: RegExp) -> JsValue

Converts to this type from the input type.
source§

impl From<RelativeTimeFormat> for JsValue

source§

fn from(obj: RelativeTimeFormat) -> JsValue

Converts to this type from the input type.
source§

impl From<RuntimeError> for JsValue

source§

fn from(obj: RuntimeError) -> JsValue

Converts to this type from the input type.
source§

impl From<SecurityPolicyViolationEvent> for JsValue

source§

fn from(obj: SecurityPolicyViolationEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<Set> for JsValue

source§

fn from(obj: Set) -> JsValue

Converts to this type from the input type.
source§

impl From<SharedArrayBuffer> for JsValue

source§

fn from(obj: SharedArrayBuffer) -> JsValue

Converts to this type from the input type.
source§

impl From<StorageEvent> for JsValue

source§

fn from(obj: StorageEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<String> for JsValue

source§

fn from(s: String) -> JsValue

Converts to this type from the input type.
source§

impl From<SubmitEvent> for JsValue

source§

fn from(obj: SubmitEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<Symbol> for JsValue

source§

fn from(obj: Symbol) -> JsValue

Converts to this type from the input type.
source§

impl From<SyntaxError> for JsValue

source§

fn from(obj: SyntaxError) -> JsValue

Converts to this type from the input type.
source§

impl From<Table> for JsValue

source§

fn from(obj: Table) -> JsValue

Converts to this type from the input type.
source§

impl From<Tag> for JsValue

source§

fn from(obj: Tag) -> JsValue

Converts to this type from the input type.
source§

impl From<Text> for JsValue

source§

fn from(obj: Text) -> JsValue

Converts to this type from the input type.
source§

impl From<TouchEvent> for JsValue

source§

fn from(obj: TouchEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<TransitionEvent> for JsValue

source§

fn from(obj: TransitionEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<TypeError> for JsValue

source§

fn from(obj: TypeError) -> JsValue

Converts to this type from the input type.
source§

impl From<UiEvent> for JsValue

source§

fn from(obj: UiEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<Uint16Array> for JsValue

source§

fn from(obj: Uint16Array) -> JsValue

Converts to this type from the input type.
source§

impl From<Uint32Array> for JsValue

source§

fn from(obj: Uint32Array) -> JsValue

Converts to this type from the input type.
source§

impl From<Uint8Array> for JsValue

source§

fn from(obj: Uint8Array) -> JsValue

Converts to this type from the input type.
source§

impl From<Uint8ClampedArray> for JsValue

source§

fn from(obj: Uint8ClampedArray) -> JsValue

Converts to this type from the input type.
source§

impl From<UriError> for JsValue

source§

fn from(obj: UriError) -> JsValue

Converts to this type from the input type.
source§

impl<T> From<Vec<T>> for JsValue
where JsValue: From<Box<[T]>>,

source§

fn from(vector: Vec<T>) -> JsValue

Converts to this type from the input type.
source§

impl From<WeakMap> for JsValue

source§

fn from(obj: WeakMap) -> JsValue

Converts to this type from the input type.
source§

impl From<WeakSet> for JsValue

source§

fn from(obj: WeakSet) -> JsValue

Converts to this type from the input type.
source§

impl From<WheelEvent> for JsValue

source§

fn from(obj: WheelEvent) -> JsValue

Converts to this type from the input type.
source§

impl From<Window> for JsValue

source§

fn from(obj: Window) -> JsValue

Converts to this type from the input type.
source§

impl From<bool> for JsValue

source§

fn from(s: bool) -> JsValue

Converts to this type from the input type.
source§

impl From<f32> for JsValue

source§

fn from(n: f32) -> JsValue

Converts to this type from the input type.
source§

impl From<f64> for JsValue

source§

fn from(n: f64) -> JsValue

Converts to this type from the input type.
source§

impl From<i128> for JsValue

source§

fn from(n: i128) -> JsValue

Converts to this type from the input type.
source§

impl From<i16> for JsValue

source§

fn from(n: i16) -> JsValue

Converts to this type from the input type.
source§

impl From<i32> for JsValue

source§

fn from(n: i32) -> JsValue

Converts to this type from the input type.
source§

impl From<i64> for JsValue

source§

fn from(n: i64) -> JsValue

Converts to this type from the input type.
source§

impl From<i8> for JsValue

source§

fn from(n: i8) -> JsValue

Converts to this type from the input type.
source§

impl From<isize> for JsValue

source§

fn from(n: isize) -> JsValue

Converts to this type from the input type.
source§

impl From<u128> for JsValue

source§

fn from(n: u128) -> JsValue

Converts to this type from the input type.
source§

impl From<u16> for JsValue

source§

fn from(n: u16) -> JsValue

Converts to this type from the input type.
source§

impl From<u32> for JsValue

source§

fn from(n: u32) -> JsValue

Converts to this type from the input type.
source§

impl From<u64> for JsValue

source§

fn from(n: u64) -> JsValue

Converts to this type from the input type.
source§

impl From<u8> for JsValue

source§

fn from(n: u8) -> JsValue

Converts to this type from the input type.
source§

impl From<usize> for JsValue

source§

fn from(n: usize) -> JsValue

Converts to this type from the input type.
source§

impl FromWasmAbi for JsValue

source§

type Abi = u32

The Wasm ABI type that this converts from when coming back out from the ABI boundary.
source§

unsafe fn from_abi(js: u32) -> JsValue

Recover a Self from Self::Abi. Read more
source§

impl<'a> IntoWasmAbi for &'a JsValue

source§

type Abi = u32

The Wasm ABI type that this converts into when crossing the ABI boundary.
source§

fn into_abi(self) -> u32

Convert self into Self::Abi so that it can be sent across the wasm ABI boundary.
source§

impl IntoWasmAbi for JsValue

source§

type Abi = u32

The Wasm ABI type that this converts into when crossing the ABI boundary.
source§

fn into_abi(self) -> u32

Convert self into Self::Abi so that it can be sent across the wasm ABI boundary.
source§

impl JsCast for JsValue

source§

fn instanceof(_val: &JsValue) -> bool

Performs a dynamic instanceof check to see whether the JsValue provided is an instance of this type. Read more
source§

fn unchecked_from_js(val: JsValue) -> JsValue

Performs a zero-cost unchecked conversion from a JsValue into an instance of Self Read more
source§

fn unchecked_from_js_ref(val: &JsValue) -> &JsValue

Performs a zero-cost unchecked conversion from a &JsValue into an instance of &Self. Read more
source§

fn has_type<T>(&self) -> bool
where T: JsCast,

Test whether this JS value has a type T. Read more
source§

fn dyn_into<T>(self) -> Result<T, Self>
where T: JsCast,

Performs a dynamic cast (checked at runtime) of this value into the target type T. Read more
source§

fn dyn_ref<T>(&self) -> Option<&T>
where T: JsCast,

Performs a dynamic cast (checked at runtime) of this value into the target type T. Read more
source§

fn unchecked_into<T>(self) -> T
where T: JsCast,

Performs a zero-cost unchecked cast into the specified type. Read more
source§

fn unchecked_ref<T>(&self) -> &T
where T: JsCast,

Performs a zero-cost unchecked cast into a reference to the specified type. Read more
source§

fn is_instance_of<T>(&self) -> bool
where T: JsCast,

Test whether this JS value is an instance of the type T. Read more
source§

fn is_type_of(val: &JsValue) -> bool

Performs a dynamic check to see whether the JsValue provided is a value of this type. Read more
source§

impl LongRefFromWasmAbi for JsValue

source§

type Abi = u32

Same as RefFromWasmAbi::Abi
source§

type Anchor = JsValue

Same as RefFromWasmAbi::Anchor
source§

unsafe fn long_ref_from_abi(js: u32) -> <JsValue as LongRefFromWasmAbi>::Anchor

Same as RefFromWasmAbi::ref_from_abi
source§

impl Mul<&JsValue> for JsValue

source§

type Output = <&'static JsValue as Mul>::Output

The resulting type after applying the * operator.
source§

fn mul(self, other: &JsValue) -> <&'static JsValue as Mul>::Output

Performs the * operation. Read more
source§

impl<'a> Mul<JsValue> for &'a JsValue

source§

type Output = <&'static JsValue as Mul>::Output

The resulting type after applying the * operator.
source§

fn mul(self, other: JsValue) -> <&'static JsValue as Mul>::Output

Performs the * operation. Read more
source§

impl Mul for &JsValue

source§

fn mul(self, rhs: &JsValue) -> <&JsValue as Mul>::Output

Applies the binary * JS operator on two JsValues.

MDN documentation

source§

type Output = JsValue

The resulting type after applying the * operator.
source§

impl Mul for JsValue

source§

type Output = <&'static JsValue as Mul>::Output

The resulting type after applying the * operator.
source§

fn mul(self, other: JsValue) -> <&'static JsValue as Mul>::Output

Performs the * operation. Read more
source§

impl Neg for &JsValue

source§

fn neg(self) -> <&JsValue as Neg>::Output

Applies the unary - JS operator on a JsValue.

MDN documentation

source§

type Output = JsValue

The resulting type after applying the - operator.
source§

impl Neg for JsValue

source§

type Output = <&'static JsValue as Neg>::Output

The resulting type after applying the - operator.
source§

fn neg(self) -> <&'static JsValue as Neg>::Output

Performs the unary - operation. Read more
source§

impl Not for &JsValue

source§

fn not(self) -> <&JsValue as Not>::Output

Applies the ! JS operator on a JsValue.

MDN documentation

source§

type Output = bool

The resulting type after applying the ! operator.
source§

impl Not for JsValue

source§

type Output = <&'static JsValue as Not>::Output

The resulting type after applying the ! operator.
source§

fn not(self) -> <&'static JsValue as Not>::Output

Performs the unary ! operation. Read more
source§

impl<'a> PartialEq<&'a String> for JsValue

source§

fn eq(&self, other: &&'a String) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'a> PartialEq<&'a str> for JsValue

source§

fn eq(&self, other: &&'a str) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<String> for JsValue

source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<bool> for JsValue

source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<f32> for JsValue

source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<f64> for JsValue

source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<i128> for JsValue

source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<i16> for JsValue

source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<i32> for JsValue

source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<i64> for JsValue

source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<i8> for JsValue

source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<isize> for JsValue

source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<str> for JsValue

source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<u128> for JsValue

source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<u16> for JsValue

source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<u32> for JsValue

source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<u64> for JsValue

source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<u8> for JsValue

source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<usize> for JsValue

source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq for JsValue

source§

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

Compares two JsValues for equality, using the === operator in JS.

MDN documentation

1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl RefFromWasmAbi for JsValue

source§

type Abi = u32

The Wasm ABI type references to Self are recovered from.
source§

type Anchor = ManuallyDrop<JsValue>

The type that holds the reference to Self for the duration of the invocation of the function that has an &Self parameter. This is required to ensure that the lifetimes don’t persist beyond one function call, and so that they remain anonymous.
source§

unsafe fn ref_from_abi(js: u32) -> <JsValue as RefFromWasmAbi>::Anchor

Recover a Self::Anchor from Self::Abi. Read more
source§

impl Rem<&JsValue> for JsValue

source§

type Output = <&'static JsValue as Rem>::Output

The resulting type after applying the % operator.
source§

fn rem(self, other: &JsValue) -> <&'static JsValue as Rem>::Output

Performs the % operation. Read more
source§

impl<'a> Rem<JsValue> for &'a JsValue

source§

type Output = <&'static JsValue as Rem>::Output

The resulting type after applying the % operator.
source§

fn rem(self, other: JsValue) -> <&'static JsValue as Rem>::Output

Performs the % operation. Read more
source§

impl Rem for &JsValue

source§

fn rem(self, rhs: &JsValue) -> <&JsValue as Rem>::Output

Applies the binary % JS operator on two JsValues.

MDN documentation

source§

type Output = JsValue

The resulting type after applying the % operator.
source§

impl Rem for JsValue

source§

type Output = <&'static JsValue as Rem>::Output

The resulting type after applying the % operator.
source§

fn rem(self, other: JsValue) -> <&'static JsValue as Rem>::Output

Performs the % operation. Read more
source§

impl Shl<&JsValue> for JsValue

source§

type Output = <&'static JsValue as Shl>::Output

The resulting type after applying the << operator.
source§

fn shl(self, other: &JsValue) -> <&'static JsValue as Shl>::Output

Performs the << operation. Read more
source§

impl<'a> Shl<JsValue> for &'a JsValue

source§

type Output = <&'static JsValue as Shl>::Output

The resulting type after applying the << operator.
source§

fn shl(self, other: JsValue) -> <&'static JsValue as Shl>::Output

Performs the << operation. Read more
source§

impl Shl for &JsValue

source§

fn shl(self, rhs: &JsValue) -> <&JsValue as Shl>::Output

Applies the binary << JS operator on two JsValues.

MDN documentation

source§

type Output = JsValue

The resulting type after applying the << operator.
source§

impl Shl for JsValue

source§

type Output = <&'static JsValue as Shl>::Output

The resulting type after applying the << operator.
source§

fn shl(self, other: JsValue) -> <&'static JsValue as Shl>::Output

Performs the << operation. Read more
source§

impl Shr<&JsValue> for JsValue

source§

type Output = <&'static JsValue as Shr>::Output

The resulting type after applying the >> operator.
source§

fn shr(self, other: &JsValue) -> <&'static JsValue as Shr>::Output

Performs the >> operation. Read more
source§

impl<'a> Shr<JsValue> for &'a JsValue

source§

type Output = <&'static JsValue as Shr>::Output

The resulting type after applying the >> operator.
source§

fn shr(self, other: JsValue) -> <&'static JsValue as Shr>::Output

Performs the >> operation. Read more
source§

impl Shr for &JsValue

source§

fn shr(self, rhs: &JsValue) -> <&JsValue as Shr>::Output

Applies the binary >> JS operator on two JsValues.

MDN documentation

source§

type Output = JsValue

The resulting type after applying the >> operator.
source§

impl Shr for JsValue

source§

type Output = <&'static JsValue as Shr>::Output

The resulting type after applying the >> operator.
source§

fn shr(self, other: JsValue) -> <&'static JsValue as Shr>::Output

Performs the >> operation. Read more
source§

impl Sub<&JsValue> for JsValue

source§

type Output = <&'static JsValue as Sub>::Output

The resulting type after applying the - operator.
source§

fn sub(self, other: &JsValue) -> <&'static JsValue as Sub>::Output

Performs the - operation. Read more
source§

impl<'a> Sub<JsValue> for &'a JsValue

source§

type Output = <&'static JsValue as Sub>::Output

The resulting type after applying the - operator.
source§

fn sub(self, other: JsValue) -> <&'static JsValue as Sub>::Output

Performs the - operation. Read more
source§

impl Sub for &JsValue

source§

fn sub(self, rhs: &JsValue) -> <&JsValue as Sub>::Output

Applies the binary - JS operator on two JsValues.

MDN documentation

source§

type Output = JsValue

The resulting type after applying the - operator.
source§

impl Sub for JsValue

source§

type Output = <&'static JsValue as Sub>::Output

The resulting type after applying the - operator.
source§

fn sub(self, other: JsValue) -> <&'static JsValue as Sub>::Output

Performs the - operation. Read more
source§

impl TryFrom<&JsValue> for f64

source§

fn try_from(val: &JsValue) -> Result<f64, <f64 as TryFrom<&JsValue>>::Error>

Applies the unary + JS operator on a JsValue. Returns the numeric result on success, or the JS error value on error.

MDN documentation

source§

type Error = JsValue

The type returned in the event of a conversion error.
source§

impl TryFrom<JsValue> for String

source§

type Error = JsValue

The type returned in the event of a conversion error.
source§

fn try_from( value: JsValue, ) -> Result<String, <String as TryFrom<JsValue>>::Error>

Performs the conversion.
source§

impl TryFrom<JsValue> for f64

source§

fn try_from(val: JsValue) -> Result<f64, <f64 as TryFrom<JsValue>>::Error>

Applies the unary + JS operator on a JsValue. Returns the numeric result on success, or the JS error value on error.

MDN documentation

source§

type Error = JsValue

The type returned in the event of a conversion error.
source§

impl TryFrom<JsValue> for i128

source§

type Error = JsValue

The type returned in the event of a conversion error.
source§

fn try_from(v: JsValue) -> Result<i128, JsValue>

Performs the conversion.
source§

impl TryFrom<JsValue> for i64

source§

type Error = JsValue

The type returned in the event of a conversion error.
source§

fn try_from(v: JsValue) -> Result<i64, JsValue>

Performs the conversion.
source§

impl TryFrom<JsValue> for u128

source§

type Error = JsValue

The type returned in the event of a conversion error.
source§

fn try_from(v: JsValue) -> Result<u128, JsValue>

Performs the conversion.
source§

impl TryFrom<JsValue> for u64

source§

type Error = JsValue

The type returned in the event of a conversion error.
source§

fn try_from(v: JsValue) -> Result<u64, JsValue>

Performs the conversion.
source§

impl VectorFromWasmAbi for JsValue

source§

impl VectorIntoWasmAbi for JsValue

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

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

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

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

source§

type Abi = <T as IntoWasmAbi>::Abi

Same as IntoWasmAbi::Abi
source§

fn return_abi(self) -> <T as ReturnWasmAbi>::Abi

Same as IntoWasmAbi::into_abi, except that it may throw and never return in the case of Err.
source§

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

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.