[−][src]Struct cala_core::os::web::JsVar
A JavaScript variable.
Implementations
impl JsVar[src]
pub unsafe fn into_promise<T: From<JsVar>>(self) -> JsPromise<T>[src]
Assume the JavaScript variable is a promise, and convert to a JsPromise.
pub unsafe fn into_fn(self) -> JsFn[src]
Assuming the JavaScript variable is a function with two parameters,
convert into a JsFn.
pub fn from_i32(value: i32) -> JsVar[src]
Create a new JsVar from a Rust integer
pub unsafe fn into_i32(&self) -> i32[src]
Get a Rust integer from a JsVar.
pub fn from_f32(value: f32) -> JsVar[src]
Create a new JsVar from a Rust float
pub unsafe fn into_f32(&self) -> f32[src]
Get a Rust float from a JsVar.
pub fn from_f64(value: f64) -> JsVar[src]
Create a new JsVar from a Rust float
pub unsafe fn into_f64(&self) -> f64[src]
Get a Rust float from a JsVar.
pub unsafe fn read_utf16(&self, output: &mut Vec<u16>)[src]
Assume the variable is a string and copy into Rust Vec.
pub unsafe fn read_bytes(&self, output: &mut Vec<u8>)[src]
Assume the variable is an array and copy into Rust Vec.
pub unsafe fn read_ints(&self, output: &mut Vec<i32>)[src]
Assume the variable is an array and copy into Rust Vec.
pub unsafe fn read_floats(&self, output: &mut Vec<f32>)[src]
Assume the variable is an array and copy into Rust Vec.
pub unsafe fn read_doubles(&self, output: &mut Vec<f64>)[src]
Assume the variable is an array and copy into Rust Vec.
pub unsafe fn write_bytes(&self, input: &[u8])[src]
Assume the variable is an array and copy from Rust slice.
pub unsafe fn write_ints(&self, input: &[i32])[src]
Assume the variable is an array and copy from Rust slice.
pub unsafe fn write_floats(&self, input: &[f32])[src]
Assume the variable is an array and copy from Rust slice.
pub unsafe fn write_doubles(&self, input: &[f64])[src]
Assume the variable is an array and copy from Rust slice.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for JsVar
impl Send for JsVar
impl Sync for JsVar
impl Unpin for JsVar
impl UnwindSafe for JsVar
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<'a, T> DynBoxFut<'a> for T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,