pub struct OnTimeUpdate<V, State, Action, Callback> { /* private fields */ }Implementations§
Source§impl<V, State, Action, Callback> OnTimeUpdate<V, State, Action, Callback>
impl<V, State, Action, Callback> OnTimeUpdate<V, State, Action, Callback>
pub fn new(dom_view: V, handler: Callback) -> Self
Sourcepub fn passive(self, value: bool) -> Self
pub fn passive(self, value: bool) -> Self
Whether the event handler should be passive. (default = true)
Passive event handlers can’t prevent the browser’s default action from
running (otherwise possible with event.prevent_default()), which
restricts what they can be used for, but reduces overhead.
Sourcepub fn capture(self, value: bool) -> Self
pub fn capture(self, value: bool) -> Self
Whether the event handler should capture the event before being dispatched to any EventTarget beneath it in the DOM tree. (default = false)
Events that are bubbling upward through the tree will not trigger a listener designated to use capture. Event bubbling and capturing are two ways of propagating events that occur in an element that is nested within another element, when both elements have registered a handle for that event. The event propagation mode determines the order in which elements receive the event.
Trait Implementations§
Source§impl<V, State, Action, Callback, OA> View<State, Action, ViewCtx> for OnTimeUpdate<V, State, Action, Callback>where
State: 'static,
Action: 'static,
V: DomView<State, Action>,
OA: OptionalAction<Action> + 'static,
Callback: Fn(&mut State, Event) -> OA + 'static,
impl<V, State, Action, Callback, OA> View<State, Action, ViewCtx> for OnTimeUpdate<V, State, Action, Callback>where
State: 'static,
Action: 'static,
V: DomView<State, Action>,
OA: OptionalAction<Action> + 'static,
Callback: Fn(&mut State, Event) -> OA + 'static,
Source§type ViewState = OnEventState<<V as View<State, Action, ViewCtx>>::ViewState>
type ViewState = OnEventState<<V as View<State, Action, ViewCtx>>::ViewState>
Source§type Element = <V as View<State, Action, ViewCtx>>::Element
type Element = <V as View<State, Action, ViewCtx>>::Element
Source§fn build(
&self,
ctx: &mut ViewCtx,
app_state: &mut State,
) -> (Self::Element, Self::ViewState)
fn build( &self, ctx: &mut ViewCtx, app_state: &mut State, ) -> (Self::Element, Self::ViewState)
Source§fn rebuild(
&self,
prev: &Self,
view_state: &mut Self::ViewState,
ctx: &mut ViewCtx,
element: Mut<'_, Self::Element>,
app_state: &mut State,
)
fn rebuild( &self, prev: &Self, view_state: &mut Self::ViewState, ctx: &mut ViewCtx, element: Mut<'_, Self::Element>, app_state: &mut State, )
element based on the difference between self and prev.Source§fn teardown(
&self,
view_state: &mut Self::ViewState,
ctx: &mut ViewCtx,
element: Mut<'_, Self::Element>,
)
fn teardown( &self, view_state: &mut Self::ViewState, ctx: &mut ViewCtx, element: Mut<'_, Self::Element>, )
element being removed from the tree. Read moreSource§fn message(
&self,
view_state: &mut Self::ViewState,
message: &mut MessageContext,
element: Mut<'_, Self::Element>,
app_state: &mut State,
) -> MessageResult<Action>
fn message( &self, view_state: &mut Self::ViewState, message: &mut MessageContext, element: Mut<'_, Self::Element>, app_state: &mut State, ) -> MessageResult<Action>
message to id_path, if that is still a valid path.impl<V, State, Action, Callback> ViewMarker for OnTimeUpdate<V, State, Action, Callback>
Auto Trait Implementations§
impl<V, State, Action, Callback> Freeze for OnTimeUpdate<V, State, Action, Callback>
impl<V, State, Action, Callback> RefUnwindSafe for OnTimeUpdate<V, State, Action, Callback>where
V: RefUnwindSafe,
Callback: RefUnwindSafe,
impl<V, State, Action, Callback> Send for OnTimeUpdate<V, State, Action, Callback>
impl<V, State, Action, Callback> Sync for OnTimeUpdate<V, State, Action, Callback>
impl<V, State, Action, Callback> Unpin for OnTimeUpdate<V, State, Action, Callback>
impl<V, State, Action, Callback> UnsafeUnpin for OnTimeUpdate<V, State, Action, Callback>where
V: UnsafeUnpin,
Callback: UnsafeUnpin,
impl<V, State, Action, Callback> UnwindSafe for OnTimeUpdate<V, State, Action, Callback>where
V: UnwindSafe,
Callback: 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)
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, )
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>
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>
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
impl<V, State, Action> DomFragment<State, Action> for V
Source§impl<V, State, Action, N> DomView<State, Action> for V
impl<V, State, Action, N> DomView<State, Action> for V
type DomNode = N
Source§fn boxed(self) -> Box<AnyDomView<State, Action>>where
State: 'static,
Action: 'static,
Self: Sized,
fn boxed(self) -> Box<AnyDomView<State, Action>>where
State: 'static,
Action: 'static,
Self: Sized,
AnyDomView Read moreSource§fn after_build<F>(self, callback: F) -> AfterBuild<State, Action, Self, F>
fn after_build<F>(self, callback: F) -> AfterBuild<State, Action, Self, F>
after_buildSource§fn after_rebuild<F>(self, callback: F) -> AfterRebuild<State, Action, Self, F>
fn after_rebuild<F>(self, callback: F) -> AfterRebuild<State, Action, Self, F>
after_rebuildSource§fn before_teardown<F>(
self,
callback: F,
) -> BeforeTeardown<State, Action, Self, F>
fn before_teardown<F>( self, callback: F, ) -> BeforeTeardown<State, Action, Self, F>
before_teardownSource§fn map_state<ParentState, F>(
self,
f: F,
) -> MapState<Self, F, ParentState, State, Action, ViewCtx>where
State: 'static,
ParentState: 'static,
Self: Sized,
F: Fn(&mut ParentState) -> &mut State + 'static,
fn map_state<ParentState, F>(
self,
f: F,
) -> MapState<Self, F, ParentState, State, Action, ViewCtx>where
State: 'static,
ParentState: 'static,
Self: Sized,
F: Fn(&mut ParentState) -> &mut State + 'static,
map_stateSource§fn map_action<ParentAction, F>(
self,
f: F,
) -> MapMessage<Self, State, ParentAction, Action, ViewCtx, impl Fn(&mut State, MessageResult<Action>) -> MessageResult<ParentAction> + 'static>where
State: 'static,
ParentAction: 'static,
Action: 'static,
Self: Sized,
F: Fn(&mut State, Action) -> ParentAction + 'static,
fn map_action<ParentAction, F>(
self,
f: F,
) -> MapMessage<Self, State, ParentAction, Action, ViewCtx, impl Fn(&mut State, MessageResult<Action>) -> MessageResult<ParentAction> + 'static>where
State: 'static,
ParentAction: 'static,
Action: 'static,
Self: Sized,
F: Fn(&mut State, Action) -> ParentAction + 'static,
map_actionSource§impl<T> FromWithContext<T> for T
impl<T> FromWithContext<T> for T
fn from_with_ctx(value: T, _ctx: &mut ViewCtx) -> T
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>
impl<State, Action, Context, V> PhantomView<State, Action, Context> for V
Source§impl<State, Action, Context, V, Element> ViewSequence<State, Action, Context, Element> for Vwhere
Context: ViewPathTracker,
V: View<State, Action, Context> + ViewMarker,
Element: SuperElement<<V as View<State, Action, Context>>::Element, Context>,
<V as View<State, Action, Context>>::Element: ViewElement,
impl<State, Action, Context, V, Element> ViewSequence<State, Action, Context, Element> for Vwhere
Context: ViewPathTracker,
V: View<State, Action, Context> + ViewMarker,
Element: SuperElement<<V as View<State, Action, Context>>::Element, Context>,
<V as View<State, Action, Context>>::Element: ViewElement,
Source§const ELEMENTS_COUNT: Count = Count::One
const ELEMENTS_COUNT: Count = Count::One
Source§type SeqState = <V as View<State, Action, Context>>::ViewState
type SeqState = <V as View<State, Action, Context>>::ViewState
Source§fn seq_build(
&self,
ctx: &mut Context,
elements: &mut AppendVec<Element>,
app_state: &mut State,
) -> <V as ViewSequence<State, Action, Context, Element>>::SeqState
fn seq_build( &self, ctx: &mut Context, elements: &mut AppendVec<Element>, app_state: &mut State, ) -> <V as ViewSequence<State, Action, Context, Element>>::SeqState
elements and initialize all states.