#[repr(transparent)]
pub struct Array1<T>(_, _);
Expand description

OCaml Bigarray.Array1 type, this introduces no additional overhead compared to a Value type

Implementations

Array1::of_slice is used to convert from a slice to OCaml Bigarray, the data parameter must outlive the resulting bigarray or there is no guarantee the data will be valid. Use Array1::from_slice to clone the contents of a slice.

Convert from a slice to OCaml Bigarray, copying the array. This is the implemtation used by Array1::from for slices to avoid any potential lifetime issues

Create a new OCaml Bigarray.Array1 with the given type and size

Returns the number of items in self

Returns true when self.len() == 0

Get underlying data as Rust slice

Get underlying data as mutable Rust slice

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Convert from OCaml value

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Convert to OCaml value

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.