Expand description
Array<A>
wraps an OCaml 'a array
without converting it to Rust
Implementations
sourceimpl Array<f64>
impl Array<f64>
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
sourceimpl<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
sourceimpl<T: ToValue + FromValue> FromValue for Array<T>
impl<T: ToValue + FromValue> FromValue for Array<T>
sourcefn from_value(value: Value) -> Self
fn from_value(value: Value) -> Self
Convert from OCaml value
impl<T: Eq + ToValue + FromValue> Eq for Array<T>
impl<T: ToValue + FromValue> StructuralEq for Array<T>
impl<T: ToValue + FromValue> StructuralPartialEq for Array<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Array<T> where
T: RefUnwindSafe,
impl<T> !Send for Array<T>
impl<T> !Sync for Array<T>
impl<T> Unpin for Array<T> where
T: Unpin,
impl<T> UnwindSafe for Array<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more