pub trait Promise {
// Required methods
fn poll_state(&mut self) -> &DataState;
fn update(&mut self);
}
Expand description
Maybe this should rather be called “LazyUpdating”? Implementors can react to polling by queueing an update if needed. Update should force an update.
Required Methods§
Sourcefn poll_state(&mut self) -> &DataState
fn poll_state(&mut self) -> &DataState
Polls the promise, triggers update if state is DataState::Uninitialized