Struct cl_array_ext::SliceN [−][src]
Expand description
A slice with at least N elements. Can be dereferenced back into a regular slice on demand.
use cl_array_ext::SliceN;
let a: &mut [_] = &mut [1, 2, 3, 4, 5];
let b: &mut SliceN<_, 3> = a.try_into().unwrap();
b.head = [3, 2, 1];
b.tail.reverse();
assert_eq!(a, [3, 2, 1, 5, 4]);
Fields
head: [T; N]
tail: [T]
Implementations
Trait Implementations
type Error = NotEnoughEntries
type Error = NotEnoughEntries
The type returned in the event of a conversion error.
Performs the conversion.