Skip to content

Glossary: Rust Beyond the Basics

slice

Also written: &[T], slices

A borrowed view of part or all of a list, written `&[T]`. A `&Vec<T>` can always be passed where a slice is expected.

Where the book teaches it

Related terms

generic