Trait flatk::RemovePrefix [−][src]
pub trait RemovePrefix {
fn remove_prefix(&mut self, n: usize);
}
Expand description
A helper trait used to help implement the Subset. This trait allows abstract collections to remove a number of elements from the beginning, which is what we need for subsets.
Required methods
fn remove_prefix(&mut self, n: usize)
fn remove_prefix(&mut self, n: usize)
Remove n
elements from the beginning.
Implementations on Foreign Types
Remove a prefix of size n
from this mutable slice.
Example
use flatk::*;
let mut v = vec![1,2,3,4,5];
let mut s = v.as_mut_slice();
s.remove_prefix(2);
assert_eq!(&[3,4,5], s);
Implementors
Required for building Subset
s of UniChunked
types.
Required for subsets of chunked collections.