pub trait HookPollNextUpdate {
    fn poll_next_update(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<bool>;
}

Required Methods

The meaning of the return value is:

  • Poll::Pending means this hook’s inner state is not updated after the last use_hook. The executor DO NOT NEED to call use_hook again because the returned value is expected to remain the same as the value from the last call. The executor CAN still call use_hook to re-get the returned value.

  • Poll::Ready(true) means this hook’s inner state has been updated since the last use_hook. The executor SHOULD call use_hook again to get the new value. The executor CAN ignore this update, by polling next update without calling use_hook.

  • Poll::Ready(false) means this hook’s inner state will never be updated. The executor CAN no longer call use_hook or even drop this hook. The executor CAN also call use_hook to get the value and the hook MIGHT become dynamic again during use_hook or when some operations is done to the returned value.

Implementations on Foreign Types

Implementors