pub trait SliceLike: Sized + Copy {
type Item: Copy;
type IntoIter: Iterator<Item = Self::Item>;
// Required methods
fn iter(self) -> Self::IntoIter;
fn as_slice(&self) -> &[Self::Item];
// Provided methods
fn get(self, idx: usize) -> Option<Self::Item> { ... }
fn len(self) -> usize { ... }
fn is_empty(self) -> bool { ... }
fn contains(self, t: &Self::Item) -> bool
where Self::Item: PartialEq { ... }
fn to_vec(self) -> Vec<Self::Item> { ... }
fn last(self) -> Option<Self::Item> { ... }
fn split_last(&self) -> Option<(&Self::Item, &[Self::Item])> { ... }
}
Required Associated Types§
Required Methods§
Provided Methods§
fn get(self, idx: usize) -> Option<Self::Item>
fn len(self) -> usize
fn is_empty(self) -> bool
fn contains(self, t: &Self::Item) -> bool
fn to_vec(self) -> Vec<Self::Item>
fn last(self) -> Option<Self::Item>
fn split_last(&self) -> Option<(&Self::Item, &[Self::Item])>
Object Safety§
This trait is not object safe.