Trait SplitFirst

Source
pub trait SplitFirst: Sized {
    type Element;

    // Required method
    fn split_first(self) -> Option<(Self::Element, Self)>;
}
Expand description

This trait allows removing the first element from the input.

Required Associated Types§

Required Methods§

Source

fn split_first(self) -> Option<(Self::Element, 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.

Implementations on Foreign Types§

Source§

impl<'a> SplitFirst for &'a str

Source§

impl<'a, T> SplitFirst for &'a [T]

Implementors§