slyce
Slyce implements a python-like slicer for rust.
Indices can be addressed as absolute positions or relatively to the end of the array (Tail). Out of bound indices are simply omitted.
Slice indices are represented with an enum that wraps the full usize range, but also
captures the possibility of a "negative" or "backward" index.
This crate provides a few implementations of From<T> for Index for common types,
so you can pass numbers and options instead of Index (just call .into()).
Example
use ;
let v = vec!;
let render = ;
let start: isize = -3;
let s = Slice;
assert_eq!;
let s = Slice;
assert_eq!;
let end: = None;
let s = Slice;
assert_eq!;
let s = Slice;
assert_eq!;
let s = Slice;
assert_eq!;
let s = Slice;
assert_eq!;
let s = Slice;
assert_eq!;
License: BSD-2-Clause