Expand description
Array<A>
wraps an OCaml 'a array
without converting it to Rust
Implementations
sourceimpl<'a> Array<'a, f64>
impl<'a> Array<'a, f64>
sourcepub unsafe fn set_double_unchecked(&mut self, i: usize, f: f64)
pub unsafe fn set_double_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<'a, T: IntoValue + FromValue<'a>> Array<'a, T>
impl<'a, T: IntoValue + FromValue<'a>> Array<'a, T>
sourcepub fn is_double_array(&self) -> bool
pub fn is_double_array(&self) -> bool
Check if Array contains only doubles, if so get_double
and set_double
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(&'a self, i: usize) -> T
pub unsafe fn get_unchecked(&'a self, i: usize) -> T
Trait Implementations
sourceimpl<'a, T: IntoValue + FromValue<'a>> FromValue<'a> for Array<'a, T>
impl<'a, T: IntoValue + FromValue<'a>> FromValue<'a> for Array<'a, T>
sourcefn from_value(value: Value) -> Self
fn from_value(value: Value) -> Self
Convert from OCaml value
sourceimpl<'a, T: IntoValue + FromValue<'a>> IntoValue for Array<'a, T>
impl<'a, T: IntoValue + FromValue<'a>> IntoValue for Array<'a, T>
sourcefn into_value(self, _rt: &Runtime) -> Value
fn into_value(self, _rt: &Runtime) -> Value
Convert to OCaml value
impl<'a, T: IntoValue + FromValue<'a>> StructuralPartialEq for Array<'a, T>
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for Array<'a, T> where
T: RefUnwindSafe,
impl<'a, T> !Send for Array<'a, T>
impl<'a, T> !Sync for Array<'a, T>
impl<'a, T> Unpin for Array<'a, T>
impl<'a, T> UnwindSafe for Array<'a, T> where
T: RefUnwindSafe,
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more