Trait lazy_async_promise::Promise
source · 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