pub trait StateUpdater<S: ?Sized> {
// Required method
fn poll_update_state(
&mut self,
state: &mut S,
cx: &mut Context<'_>,
) -> Poll<bool>;
}
Required Methods§
Sourcefn poll_update_state(
&mut self,
state: &mut S,
cx: &mut Context<'_>,
) -> Poll<bool>
fn poll_update_state( &mut self, state: &mut S, cx: &mut Context<'_>, ) -> Poll<bool>
- Returning
Poll::Ready(true)
meansstate
is newly updated. - Returning
Poll::Pending
meansstate
is not updated but there might be updates. - Returning
Poll::Ready(false)
meansstate
is not updated and there will never be updates.