Get Slice
Imagine a situation where you need to get a portion of a vector. Rust allows you to borrow the slice of the vector instead of using the whole vector.
Syntax
Slice is a two-word object. The first word is a pointer to the data, and the second word is the length of the slice.
Create a free account to access the full course.
Continue your learning journey with a 14-day free trial.
By signing up, you agree to Educative's Terms of Service and Privacy Policy