pub trait ResizeSlice {
// Required methods
fn resize(&mut self, start: usize, end: usize);
fn resize_from(&mut self, start: usize);
fn resize_to(&mut self, end: usize);
}
Expand description
Extension trait that allows you to resize mutable slice references
Required Methods§
Sourcefn resize(&mut self, start: usize, end: usize)
fn resize(&mut self, start: usize, end: usize)
Resizes the slice to start
offset and end - start
len
§Panics
Panics on out of bounds resize (start <= end <= self.len()
)