pub trait Input: Sized {
type ConstSize<const N: usize>: Sized;
type ConstSizeOwned<const N: usize>: Sized + 'static;
// Required methods
fn len(&self) -> usize;
fn take_first(&self, i: usize) -> Option<(Self, Self)>;
fn take_first_const<const N: usize>(
&self,
) -> Option<(Self::ConstSize<N>, Self)>;
fn take_first_const_owned<const N: usize>(
&self,
) -> Option<(Self::ConstSizeOwned<N>, Self)>;
// Provided methods
fn is_empty(&self) -> bool { ... }
fn starts_with<N>(&self, needle: &N) -> bool
where N: Needle<Self> { ... }
}
Required Associated Types§
type ConstSize<const N: usize>: Sized
type ConstSizeOwned<const N: usize>: Sized + 'static
Required Methods§
fn len(&self) -> usize
fn take_first(&self, i: usize) -> Option<(Self, Self)>
fn take_first_const<const N: usize>(&self) -> Option<(Self::ConstSize<N>, Self)>
fn take_first_const_owned<const N: usize>( &self, ) -> Option<(Self::ConstSizeOwned<N>, Self)>
Provided Methods§
fn is_empty(&self) -> bool
fn starts_with<N>(&self, needle: &N) -> boolwhere
N: Needle<Self>,
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.