pub struct LiveView {
pub read: Box<dyn FnMut() -> Pending<LiveRead> + Send>,
pub changes: Box<dyn FnMut() -> Pending<()> + Send>,
}Expand description
A result that stays current (crate::ExecutionMode::Live), as a provider serves it.
Fields§
§read: Box<dyn FnMut() -> Pending<LiveRead> + Send>The whole result as it is now. A provider that reads it on a thread of its own answers
when it has; one that has it at hand answers at once (Pending::ready).
changes: Box<dyn FnMut() -> Pending<()> + Send>Asked before each read: resolves once the result may have changed after it. A provider that stopped serving the result drops it unanswered, which ends the view.
Auto Trait Implementations§
impl !RefUnwindSafe for LiveView
impl !Sync for LiveView
impl !UnwindSafe for LiveView
impl Forget for LiveView
impl Freeze for LiveView
impl Move for LiveView
impl Send for LiveView
impl Unpin for LiveView
impl UnsafeUnpin for LiveView
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> 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