FromNonEmptyIterator

Trait FromNonEmptyIterator 

Source
pub trait FromNonEmptyIterator<T>: Sized {
    // Required method
    fn from_non_empty_iter<I: IntoNonEmptyIterator<Item = T>>(
        iterable: I,
    ) -> Self;
}
Expand description

Represents types that can be created from non-empty iterators.

This is similar to FromIterator, but specifically for non-empty iterators.

Required Methods§

Source

fn from_non_empty_iter<I: IntoNonEmptyIterator<Item = T>>(iterable: I) -> Self

Creates Self from the provided non-empty iterator.

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§