Trait SlicePattern
trait SlicePattern
Patterns in slices - currently, only used by strip_prefix and strip_suffix. At a future
point, we hope to generalise core::str::Pattern (which at the time of writing is limited to
str) to slices, and then this trait will be replaced or abolished.
Associated Types
type ItemThe element type of the slice being matched on.
Required Methods
fn as_slice(self: &Self) -> &[<Self as >::Item]Currently, the consumers of
SlicePatternneed a slice.
Implementors
impl<T> SlicePattern for [T]impl<T, N: usize> SlicePattern for [T; N]