nslice
Structures for interpreting slices of variable length as arrays.
nslice
provides MinSlice
and ExactSlice
for representing slices known to have
either exactly or at least some compile-time-known number of values.
This is useful when dealing with a slice whose length you expect to be exactly or at least some particular length; rather than making runtime checks on each access, you can check the length once and access values freely with no copying.
# use MinSlice;
let slice = &;
let minslice: & = from_slice.unwrap;
assert_eq!;
assert_eq!;
assert_eq!;
MSRV
This project supports Rust 1.56.1 and onward.
License
This project is licensed MIT.