pub struct WidgetRunner<A: Clone + 'static> { /* private fields */ }Expand description
Represents an widget Handler<A> caller that manages the async tasks if needed.
See Handler::into_wgt_runner for more details.
Implementations§
Source§impl<A: Clone + 'static> WidgetRunner<A>
impl<A: Clone + 'static> WidgetRunner<A>
Sourcepub fn event(&mut self, args: &A)
pub fn event(&mut self, args: &A)
Call HandlerExt::widget_event and start UI task is needed.
Sourcepub fn update(&mut self)
pub fn update(&mut self)
Update async tasks.
UI node implementers must call this on UiNodeOp::Update.
For preview events before delegation to child, for other after delegation.
Sourcepub fn deinit(&mut self)
pub fn deinit(&mut self)
Drop pending tasks.
Dropped tasks will log a warning.
UI node implementers must call this on UiNodeOp::Deinit, async tasks must not run across widget reinit.
Auto Trait Implementations§
impl<A> Freeze for WidgetRunner<A>
impl<A> !RefUnwindSafe for WidgetRunner<A>
impl<A> Send for WidgetRunner<A>
impl<A> !Sync for WidgetRunner<A>
impl<A> Unpin for WidgetRunner<A>
impl<A> !UnwindSafe for WidgetRunner<A>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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