The Slice Type - The Rust Programming Language
Slices let you reference a contiguous sequence of elements in a collection rather than the whole collection. A slice is a kind of reference, so it does not have ownership.
The Slice Type - The Rust Programming Language Keyboard shortcuts Press ← or → to navigate between chapters Press S or / to search in the book Press ? to show this help Press Esc to hide this help Auto Light Rust Coal Navy Ayu The Rust Programming Language The Slice Type Slices let you reference a contiguous sequence of elements in a collection . A slice is a kind of reference, so it does not have ownership. Here’s a small programming problem: Write a function that takes a string of words separated by spaces and returns the first word it finds in that string. If the function doesn’t find a spa
saved by
related reading
- References and Borrowing - The Rust Programming Languagedoc.rust-lang.org
- Validating References with Lifetimes - The Rust Programming Languagedoc.rust-lang.org
- What is Ownership? - The Rust Programming Languagedoc.rust-lang.org
- Storing UTF-8 Encoded Text with Strings - The Rust Programming Languagedoc.rust-lang.org
- Methods - The Rust Programming Languagedoc.rust-lang.org
- The match Control Flow Construct - The Rust Programming Languagedoc.rust-lang.org
- Defining an Enum - The Rust Programming Languagedoc.rust-lang.org
- Defining and Instantiating Structs - The Rust Programming Languagedoc.rust-lang.org
- Control Flow - The Rust Programming Languagedoc.rust-lang.org
- Variables and Mutability - The Rust Programming Languagedoc.rust-lang.org
- Storing Lists of Values with Vectors - The Rust Programming Languagedoc.rust-lang.org
- Generic Data Types - The Rust Programming Languagedoc.rust-lang.org