Skip to main content

poll_fn

Function poll_fn 

Source
pub fn poll_fn<F, Item, Meta, CanPend, CanEnd>(
    func: F,
) -> PollFn<F, Item, Meta, CanPend, CanEnd>
where F: FnMut(&mut Context<'_>) -> PullStep<Item, Meta, CanPend, CanEnd>, Meta: Copy, CanPend: Toggle, CanEnd: Toggle,
Expand description

Creates an asynchronous or synchronous pull from a closure.

The closure is called each time the pull is polled and should return a PullStep.