pub trait SplitPrefix<N>where
Self: Sized,{
type Prefix;
// Required method
fn split_prefix(self) -> Option<(Self::Prefix, Self)>;
}Expand description
Split off a number of elements from the beginning of the collection where the number is determined at compile time.
Required Associated Types§
Required Methods§
Sourcefn split_prefix(self) -> Option<(Self::Prefix, Self)>
fn split_prefix(self) -> Option<(Self::Prefix, Self)>
Split N items from the beginning of the collection.
Return None if there are not enough items.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.