Expand description
Concrete typed ownership for homogeneous, contiguous arrays. Concrete, contiguous ownership for homogeneous CEL arrays.
Transfers to and from vectors preserve their allocations. Nested arrays use
Array<Array<T>>, so each outer element is itself a typed array owner.
Its outer allocation transfers to Vec<Array<T>>, not Vec<Vec<T>>;
explicitly converting each inner owner builds a new outer vector. Borrowing
exposes &[Array<T>] without consuming the outer or inner owners.
use cel_runtime::Array;
let rows = Array::from_vec(vec![Array::from_vec(vec![1_i32, 2])]);
assert_eq!(rows.as_slice()[0].as_slice(), &[1, 2]);Structsยง
- Array
- Owns homogeneous, contiguous elements without bounds on the element type.