pub trait FromNonEmptyIterator<Item> {
// Required method
fn from_non_empty_iter<I: NonEmptyIntoIter<Item = Item>>(iter: I) -> Self;
}Expand description
Creates collection from a non-empty iterator.
This is generally implemented for collections that are guaranteed to be non-empty.
Required Methods§
Sourcefn from_non_empty_iter<I: NonEmptyIntoIter<Item = Item>>(iter: I) -> Self
fn from_non_empty_iter<I: NonEmptyIntoIter<Item = Item>>(iter: I) -> Self
Creates the collection.
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.
Implementors§
impl<T> FromNonEmptyIterator<T> for NonEmptyVec<T>
Available on crate feature
alloc only.