Module jlrs::value::array[][src]

Support for n-dimensional arrays and their dimensions.

You will find several structs in this module that can be used to work with Julia arrays from Rust. An Array is the Julia array itself, and provides methods to (mutably) access the data and copy it to Rust. Accessing array data from Rust when the type of the elements is a union of bits types is not supported, use Base.getindex instead.

The structs that represent copied or borrowed data can be accessed using an n-dimensional index written as a tuple. For example, if a is a three-dimensional array, a single element can be accessed with a[(row, col, z)].

Structs

Array

An n-dimensional Julia array. This struct implements JuliaTypecheck and Cast. It can be used in combination with DataType::is and Value::is; if the check returns true the Value can be cast to Array:

ArrayData

Immutably borrowed array data from Julia. The data has a column-major order and can be indexed with anything that implements Into<Dimensions>; see Dimensions for more information.

CopiedArray

An n-dimensional array whose contents have been copied from Julia to Rust. You can create this struct by calling Array::copy_inline_data. The data has a column-major order and can be indexed with anything that implements Into<Dimensions>; see Dimensions for more information.

InlineArrayDataMut

Mutably borrowed inline array data from Julia. The data has a column-major order and can be indexed with anything that implements Into<Dimensions>; see Dimensions for more information.

TypedArray

Exactly the same as Array, except it has an explicit element type T.

UnrestrictedInlineArrayDataMut

Mutably borrowed inline array data from Julia. The data has a column-major order and can be indexed with anything that implements Into<Dimensions>; see Dimensions for more information.

UnrestrictedValueArrayDataMut
ValueArrayDataMut

Enums

Dimensions

The dimensions of an n-dimensional array, they represent either the shape of an array or an index. Functions that need Dimensions as an input, which is currently limited to just indexing this data, are generic and accept any type that implements Into<Dimensions>.