Skip to content

Latest commit

 

History

History
58 lines (41 loc) · 1.3 KB

File metadata and controls

58 lines (41 loc) · 1.3 KB
  • Name: (fill me in: name-of-design)
  • Proposed by: [@name](link to github profile)
  • Original proposal (optional): (url)

Design

base (reference)

/// A trimmed-down version of the `std::Iterator` trait.
pub trait Iterator {
    type Item;
    fn next(&mut self) -> Option<Self::Item>;
    fn size_hint(&self) -> (usize, Option<usize>);
}

/// An adaptation of `Iterator::find` to a free-function
pub fn find<I, T, P>(iter: &mut I, predicate: P) -> Option<T>
where
    I: Iterator<Item = T> + Sized,
    P: FnMut(&T) -> bool;

always async

// fill me in

maybe async

// fill me in

generic over all modifier keywords

// fill me in

Notes