[−][src]Struct strawpoll::Strawpoll
Polling wrapper that avoids spurious calls to poll on F.
Methods
impl<F> Strawpoll<F>[src]
pub fn new(f: F) -> Self[src]
Wrap f to avoid spurious polling on it.
pub fn poll_fn<P, R>(
self: Pin<&mut Self>,
cx: &mut Context,
poll_fn: P
) -> Poll<R> where
P: FnMut(Pin<&mut F>, &mut Context) -> Poll<R>, [src]
self: Pin<&mut Self>,
cx: &mut Context,
poll_fn: P
) -> Poll<R> where
P: FnMut(Pin<&mut F>, &mut Context) -> Poll<R>,
Call poll_fn with F pinned only if F really needs to be polled.
Specifically, poll_fn will only be called if:
Fhas never been polled; orcxcontains a new waker; orFwas woken up.
Trait Implementations
impl<F: Debug> Debug for Strawpoll<F>[src]
impl<F> Deref for Strawpoll<F>[src]
impl<F> DerefMut for Strawpoll<F>[src]
impl<F> From<F> for Strawpoll<F>[src]
impl<F> Future for Strawpoll<F> where
F: Future, [src]
F: Future,
type Output = F::Output
The type of value produced on completion.
fn poll(self: Pin<&mut Self>, cx: &mut Context) -> Poll<Self::Output>[src]
impl<F> Unpin for Strawpoll<F> where
F: Unpin, [src]
F: Unpin,
Auto Trait Implementations
impl<F> RefUnwindSafe for Strawpoll<F> where
F: RefUnwindSafe,
F: RefUnwindSafe,
impl<F> Send for Strawpoll<F> where
F: Send,
F: Send,
impl<F> Sync for Strawpoll<F> where
F: Sync,
F: Sync,
impl<F> UnwindSafe for Strawpoll<F> where
F: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<!> for T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,