pub struct Cell<T> { /* private fields */ }Expand description
A displayed value together with its whole provenance.
Every field is private; the only way out is Cell::settled plus a match, so an
absent value can never be read as a default. in_flight is orthogonal to
settled rather than a fifth Settled arm, which is what lets a re-probing
cell keep its previous value instead of blanking. settled being None while
in_flight is false is a cell nothing has looked at yet, only reachable before
the first Generation covers the entity.
Implementations§
Source§impl<T> Cell<T>
impl<T> Cell<T>
Sourcepub fn settled(&self) -> Option<&Settled<T>>
pub fn settled(&self) -> Option<&Settled<T>>
The settled state, or None while absent (loading, or never yet probed).
The only way to a T.
Sourcepub fn is_in_flight(&self) -> bool
pub fn is_in_flight(&self) -> bool
Whether a probe is running against this cell right now. A row’s summary treats in-flight as a property that outranks its least-settled Cell.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Cell<T>
impl<T> RefUnwindSafe for Cell<T>
impl<T> Send for Cell<T>
impl<T> Sync for Cell<T>
impl<T> Unpin for Cell<T>
impl<T> UnsafeUnpin for Cell<T>
impl<T> UnwindSafe for Cell<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more