pub struct Task<F, H, M> { /* private fields */ }Trait Implementations§
Source§impl<State, Action, F, H, M, Fut> View<State, Action, ViewCtx> for Task<F, H, M>where
State: 'static,
Action: 'static,
F: Fn(TaskProxy, ShutdownSignal) -> Fut + 'static,
Fut: Future<Output = ()> + 'static,
H: Fn(&mut State, M) -> Action + 'static,
M: AnyDebug,
impl<State, Action, F, H, M, Fut> View<State, Action, ViewCtx> for Task<F, H, M>where
State: 'static,
Action: 'static,
F: Fn(TaskProxy, ShutdownSignal) -> Fut + 'static,
Fut: Future<Output = ()> + 'static,
H: Fn(&mut State, M) -> Action + 'static,
M: AnyDebug,
Source§type ViewState = TaskState
type ViewState = TaskState
State that is used over the lifetime of the retained representation of the view. Read more
Source§fn build(
&self,
ctx: &mut ViewCtx,
_: &mut State,
) -> (Self::Element, Self::ViewState)
fn build( &self, ctx: &mut ViewCtx, _: &mut State, ) -> (Self::Element, Self::ViewState)
Create the corresponding Element value.
Source§fn rebuild(
&self,
_: &Self,
_: &mut Self::ViewState,
_: &mut ViewCtx,
(): Mut<'_, Self::Element>,
_: &mut State,
)
fn rebuild( &self, _: &Self, _: &mut Self::ViewState, _: &mut ViewCtx, (): Mut<'_, Self::Element>, _: &mut State, )
Update
element based on the difference between self and prev.Source§fn teardown(
&self,
view_state: &mut Self::ViewState,
_: &mut ViewCtx,
_: Mut<'_, Self::Element>,
)
fn teardown( &self, view_state: &mut Self::ViewState, _: &mut ViewCtx, _: Mut<'_, Self::Element>, )
Handle
element being removed from the tree. Read moreSource§fn message(
&self,
_: &mut Self::ViewState,
message: &mut MessageContext,
_element: Mut<'_, Self::Element>,
app_state: &mut State,
) -> MessageResult<Action>
fn message( &self, _: &mut Self::ViewState, message: &mut MessageContext, _element: Mut<'_, Self::Element>, app_state: &mut State, ) -> MessageResult<Action>
Route
message to id_path, if that is still a valid path.impl<F, H, M> ViewMarker for Task<F, H, M>
Auto Trait Implementations§
impl<F, H, M> Freeze for Task<F, H, M>
impl<F, H, M> RefUnwindSafe for Task<F, H, M>where
F: RefUnwindSafe,
H: RefUnwindSafe,
impl<F, H, M> Send for Task<F, H, M>
impl<F, H, M> Sync for Task<F, H, M>
impl<F, H, M> Unpin for Task<F, H, M>
impl<F, H, M> UnsafeUnpin for Task<F, H, M>where
F: UnsafeUnpin,
H: UnsafeUnpin,
impl<F, H, M> UnwindSafe for Task<F, H, M>where
F: UnwindSafe,
H: UnwindSafe,
Blanket Implementations§
Source§impl<State, Action, Context, DynamicElement, V> AnyView<State, Action, Context, DynamicElement> for Vwhere
DynamicElement: AnyElement<<V as View<State, Action, Context>>::Element, Context>,
Context: ViewPathTracker,
V: View<State, Action, Context> + 'static,
<V as View<State, Action, Context>>::ViewState: 'static,
impl<State, Action, Context, DynamicElement, V> AnyView<State, Action, Context, DynamicElement> for Vwhere
DynamicElement: AnyElement<<V as View<State, Action, Context>>::Element, Context>,
Context: ViewPathTracker,
V: View<State, Action, Context> + 'static,
<V as View<State, Action, Context>>::ViewState: 'static,
Source§fn dyn_build(
&self,
ctx: &mut Context,
app_state: &mut State,
) -> (DynamicElement, AnyViewState)
fn dyn_build( &self, ctx: &mut Context, app_state: &mut State, ) -> (DynamicElement, AnyViewState)
Type erased
View::build.Source§fn dyn_rebuild(
&self,
dyn_state: &mut AnyViewState,
ctx: &mut Context,
prev: &dyn AnyView<State, Action, Context, DynamicElement>,
element: <DynamicElement as ViewElement>::Mut<'_>,
app_state: &mut State,
)
fn dyn_rebuild( &self, dyn_state: &mut AnyViewState, ctx: &mut Context, prev: &dyn AnyView<State, Action, Context, DynamicElement>, element: <DynamicElement as ViewElement>::Mut<'_>, app_state: &mut State, )
Type erased
View::rebuild.Source§fn dyn_teardown<'el>(
&self,
dyn_state: &mut AnyViewState,
ctx: &mut Context,
element: <DynamicElement as ViewElement>::Mut<'el>,
) -> <DynamicElement as ViewElement>::Mut<'el>
fn dyn_teardown<'el>( &self, dyn_state: &mut AnyViewState, ctx: &mut Context, element: <DynamicElement as ViewElement>::Mut<'el>, ) -> <DynamicElement as ViewElement>::Mut<'el>
Type erased
View::teardown. Read moreSource§fn dyn_message(
&self,
dyn_state: &mut AnyViewState,
message: &mut MessageContext,
element: <DynamicElement as ViewElement>::Mut<'_>,
app_state: &mut State,
) -> MessageResult<Action>
fn dyn_message( &self, dyn_state: &mut AnyViewState, message: &mut MessageContext, element: <DynamicElement as ViewElement>::Mut<'_>, app_state: &mut State, ) -> MessageResult<Action>
Type erased
View::message.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