Types that can be viewed as const slices
Types that implement this protocol can be indexed as if they were slices.
Example
use std::collections::Vector;
let v: Vector<i32> = Vector::new();
v.push(1);
v.push(2);
v.push(3);
assert_eq!(v[1], 2);
Run this example
Required methods
-
fn as_slice(self: &Self) -> &[T]