Trait list_fn::ListFn

source ·
pub trait ListFn: Sized {
    type Item;
    type End;

    // Required method
    fn next(self) -> ListState<Self>;
}
Expand description

A function which returns a list.

Required Associated Types§

source

type Item

A list item type.

source

type End

A value which is returned when the list has no more items.

Required Methods§

source

fn next(self) -> ListState<Self>

The main function which returns a list.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<I: Iterator> ListFn for &mut I

Any &mut Iterator is a ListFn<End = Self>.

source§

fn next(self) -> ListState<Self>

Converts an iterator into a list.

§

type Item = <I as Iterator>::Item

§

type End = &mut I

source§

impl<T> ListFn for Option<T>

Option as a list.

§

type Item = T

§

type End = Option<T>

source§

fn next(self) -> ListState<Self>

Implementors§

source§

impl<I, E> ListFn for OptionList<I, E>

§

type Item = I

§

type End = E

source§

impl<I, E> ListFn for MapResultList<I, E>where I: ListFn, I::End: ResultFn, E: MapResultFn<Input = <I::End as ResultFn>::Result>,

§

type Item = <I as ListFn>::Item

§

type End = Id<<E as MapResultFn>::Output>

source§

impl<I, F> ListFn for FlatScanState<I, F>where I: ListFn, F: FlatScanFn<InputItem = I::Item>, I::End: ResultFn<Result = F::InputResult>,

§

type Item = <<F as FlatScanFn>::OutputList as ListFn>::Item

§

type End = <<F as FlatScanFn>::EndList as ListFn>::End

source§

impl<I: ListFn, F: FlatMapFn<Input = I::Item>> ListFn for FlatMapList<I, F>

§

type Item = <<F as FlatMapFn>::OutputList as ListFn>::Item

§

type End = <I as ListFn>::End

source§

impl<L: ListFn> ListFn for TakeList<L>

§

type Item = <L as ListFn>::Item

§

type End = ()

source§

impl<T, E> ListFn for Empty<T, E>

§

type Item = T

§

type End = E