Skip to main content

PollProxy

Trait PollProxy 

Source
pub trait PollProxy<'a, P, E: ?Sized, EMut: ?Sized>: Sealed {
    type Progress;

    // Required method
    fn poll_progress(
        state: Pin<&mut P>,
        ext: &'a E,
        ext_mut: &mut EMut,
        cx: &mut Context<'_>,
    ) -> Poll<ControlFlow<Option<Self::Progress>, Self::Progress>>;
}
Expand description

Sealed complementary trait used internally by Selector.

Allows for handling plain Futures and Streams as Pollables through PollFuture and PollStream.

Required Associated Types§

Required Methods§

Source

fn poll_progress( state: Pin<&mut P>, ext: &'a E, ext_mut: &mut EMut, cx: &mut Context<'_>, ) -> Poll<ControlFlow<Option<Self::Progress>, Self::Progress>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'a, F: Future> PollProxy<'a, F, (), ()> for PollFuture

Source§

impl<'a, P, E, EMut> PollProxy<'a, P, E, EMut> for PollDirect
where P: Pollable<'a, E, EMut>, E: ?Sized, EMut: ?Sized,

Source§

type Progress = <P as Pollable<'a, E, EMut>>::Progress

Source§

impl<'a, S: Stream> PollProxy<'a, S, (), ()> for PollStream