Skip to main content

MutEagerFutureCell

Type Alias MutEagerFutureCell 

Source
pub type MutEagerFutureCell<T> = EagerFuture<Mutex<Option<T>>>;
Expand description

A cell whose value is seeded with a task scheduled at MutEagerFutureCell::new, in the background. Unlike the EagerFutureCell one-shot dual, MutEagerFutureCell allows you to emplace any arbitrary value into the cell, via the overwrite call.

Aliased Type§

pub struct MutEagerFutureCell<T> { /* private fields */ }

Implementations§

Source§

impl<T: Clone + Send + Sync + 'static> MutEagerFutureCell<T>

Source

pub fn overwrite(&self, value: T)

Force value into the cell, aborting the background future so its (now-superseded) result is discarded. Any current or future get observes value.