Expand description
Array<A>
wraps an OCaml 'a array
without converting it to Rust
Implementations§
source§impl Array<Float>
impl Array<Float>
sourcepub unsafe fn set_f64_unchecked(&mut self, i: usize, f: f64)
pub unsafe fn set_f64_unchecked(&mut self, i: usize, f: f64)
sourcepub unsafe fn get_double_unchecked(&self, i: usize) -> f64
pub unsafe fn get_double_unchecked(&self, i: usize) -> f64
Get a value from a double array without checking if the array is actually a double array
Safety
This function does not perform bounds checking
source§impl<T: ToValue + FromValue> Array<T>
impl<T: ToValue + FromValue> Array<T>
sourcepub fn is_f64(&self) -> bool
pub fn is_f64(&self) -> bool
Check if Array contains only doubles, if so get_f64
and set_f64
should be used
to access values
sourcepub unsafe fn set(&mut self, rt: &Runtime, i: usize, v: &T) -> Result<(), Error>
pub unsafe fn set(&mut self, rt: &Runtime, i: usize, v: &T) -> Result<(), Error>
Set array index
sourcepub unsafe fn set_unchecked(&mut self, rt: &Runtime, i: usize, v: &T)
pub unsafe fn set_unchecked(&mut self, rt: &Runtime, i: usize, v: &T)
sourcepub unsafe fn get_unchecked(&self, i: usize) -> T
pub unsafe fn get_unchecked(&self, i: usize) -> T
Trait Implementations§
source§impl<T: ToValue + FromValue> FromValue for Array<T>
impl<T: ToValue + FromValue> FromValue for Array<T>
source§fn from_value(value: Value) -> Self
fn from_value(value: Value) -> Self
Convert from OCaml value