Slice (Rust)

A slice is a borrowed view into a contiguous part of a collection, written &[T] for arrays/vectors or &str for strings. It references existing data without…