single 0.2.0

This crate exposes a trait "single::Single" for extracting the element from a single-element iterator.
Documentation

Single

Build Status crates.io downloads version downloads issues open issues closed

This crate exposes a Single trait for extracting the element from a single-element iterator.

License

You may use this crate under the MIT license or the Apache License (Version 2) at your discretion. This crate is dual-licensed for compatibility with rust itself.

Trait single::Single

pub trait Single {
    type Item;
    fn single(self) -> Result<Self::Item, Error>;
}

Associated Types

Required Methods

Implementors

impl<I> Single for I
  where I: Iterator