Trait flatk::SplitFirst[][src]

pub trait SplitFirst where
    Self: Sized
{ type First; fn split_first(self) -> Option<(Self::First, Self)>; unsafe fn split_first_unchecked(self) -> (Self::First, Self) { ... } }
Expand description

Split out the first element of a collection.

Associated Types

Required methods

Provided methods

Split off the first element without checking if one exists.

Safety

The collection must have at least one element otherwise this function may cause undefined behaviour if implemented.

The default implementation simply calls unwrap on split_first.

Implementations on Foreign Types

Implementors

This impl enables Subsets of Subsets