pub enum Val {
I32(i32),
I64(i64),
F32(u32),
F64(u64),
}
Variants§
Implementations§
Trait Implementations§
Source§impl FromJsValue for Val
impl FromJsValue for Val
Source§impl ToJsValue for Val
impl ToJsValue for Val
type ReturnAbi = JsValue
fn to_js_value(&self) -> JsValue
Source§fn into_return_abi(self) -> Result<Self::ReturnAbi, JsValue>
fn into_return_abi(self) -> Result<Self::ReturnAbi, JsValue>
When this is returned from a closure
Source§fn number_of_args() -> u32
fn number_of_args() -> u32
Number of function arguments when this type is used as a function input type
Source§fn to_function_args(&self) -> Array
fn to_function_args(&self) -> Array
Convert to function arguments when calling a function with this value
Source§fn create_array_of_size(size: u32) -> JsValue
fn create_array_of_size(size: u32) -> JsValue
When converting Vec to JsValue, create array or Int32Array for example
Auto Trait Implementations§
impl Freeze for Val
impl RefUnwindSafe for Val
impl Send for Val
impl Sync for Val
impl Unpin for Val
impl UnwindSafe for Val
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more