Trait StateUpdater

Source
pub trait StateUpdater<S: ?Sized> {
    // Required method
    fn poll_update_state(
        &mut self,
        state: &mut S,
        cx: &mut Context<'_>,
    ) -> Poll<bool>;
}

Required Methods§

Source

fn poll_update_state( &mut self, state: &mut S, cx: &mut Context<'_>, ) -> Poll<bool>

  • Returning Poll::Ready(true) means state is newly updated.
  • Returning Poll::Pending means state is not updated but there might be updates.
  • Returning Poll::Ready(false) means state is not updated and there will never be updates.

Implementors§