Trait Factory

Source
pub trait Factory {
    type Item;
    type Output: IntoIterator<Item = Self::Item>;
    type Future: Future<Output = Self::Output>;

    // Required method
    fn make(&self, range: Range<usize>, is_rev: bool) -> Self::Future;
}

Required Associated Types§

Source

type Item

Source

type Output: IntoIterator<Item = Self::Item>

Source

type Future: Future<Output = Self::Output>

Required Methods§

Source

fn make(&self, range: Range<usize>, is_rev: bool) -> Self::Future

Implementors§

Source§

impl<F, Fut, I, V> Factory for FromRangeFn<F>
where F: Fn(Range<usize>, bool) -> Fut + Clone + 'static, Fut: Future<Output = I> + 'static, I: IntoIterator<Item = V>, V: 'static,

Source§

type Item = V

Source§

type Output = I

Source§

type Future = Pin<Box<dyn Future<Output = <FromRangeFn<F> as Factory>::Output>>>

Source§

impl<F, Fut, V> Factory for FromFn<F>
where F: Fn(usize) -> Fut + Clone + 'static, Fut: Future<Output = V> + 'static, V: 'static,

Source§

type Item = V

Source§

type Output = IntoIter<V>

Source§

type Future = Pin<Box<dyn Future<Output = <FromFn<F> as Factory>::Output>>>