pub trait IntoOnly {
    type Item;

    // Required method
    fn into_only(self) -> Result<Self::Item>;
}
Expand description

Returns the only element of an Iterator, or an error if it has more than one element.

Required Associated Types§

Required Methods§

source

fn into_only(self) -> Result<Self::Item>

Implementors§

source§

impl IntoOnly for ErrorMessages

source§

impl<T, I> IntoOnly for Iwhere I: IntoIterator<Item = T>,

§

type Item = T