pub struct WithState<S, T, V> { /* private fields */ }Expand description
A view that stores some additional data.
Implementations§
Trait Implementations§
Source§impl<S, T, V> View<T> for WithState<S, T, V>
 
impl<S, T, V> View<T> for WithState<S, T, V>
Source§type State = (Pod<V>, S, PodState<(S, T), V>)
 
type State = (Pod<V>, S, PodState<(S, T), V>)
The state of the view, see top-level documentation for more information.
Source§fn build(
    &mut self,
    cx: &mut BuildCx<'_, '_>,
    data: &mut T,
) -> <WithState<S, T, V> as View<T>>::State
 
fn build( &mut self, cx: &mut BuildCx<'_, '_>, data: &mut T, ) -> <WithState<S, T, V> as View<T>>::State
Build the view state, see top-level documentation for more information.
Source§fn rebuild(
    &mut self,
    _: &mut <WithState<S, T, V> as View<T>>::State,
    cx: &mut RebuildCx<'_, '_>,
    data: &mut T,
    _old: &WithState<S, T, V>,
)
 
fn rebuild( &mut self, _: &mut <WithState<S, T, V> as View<T>>::State, cx: &mut RebuildCx<'_, '_>, data: &mut T, _old: &WithState<S, T, V>, )
Rebuild the view state, see top-level documentation for more information.
Source§fn event(
    &mut self,
    _: &mut <WithState<S, T, V> as View<T>>::State,
    cx: &mut EventCx<'_, '_>,
    data: &mut T,
    event: &Event,
) -> bool
 
fn event( &mut self, _: &mut <WithState<S, T, V> as View<T>>::State, cx: &mut EventCx<'_, '_>, data: &mut T, event: &Event, ) -> bool
Handle an event, see top-level documentation for more information.
Auto Trait Implementations§
impl<S, T, V> Freeze for WithState<S, T, V>
impl<S, T, V> !RefUnwindSafe for WithState<S, T, V>
impl<S, T, V> !Send for WithState<S, T, V>
impl<S, T, V> !Sync for WithState<S, T, V>
impl<S, T, V> Unpin for WithState<S, T, V>
impl<S, T, V> !UnwindSafe for WithState<S, T, V>
Blanket Implementations§
Source§impl<T, V> AnyView<T> for V
 
impl<T, V> AnyView<T> for V
Source§fn dyn_build(&mut self, cx: &mut BuildCx<'_, '_>, data: &mut T) -> Box<dyn Any>
 
fn dyn_build(&mut self, cx: &mut BuildCx<'_, '_>, data: &mut T) -> Box<dyn Any>
Build the view.
Source§fn dyn_rebuild(
    &mut self,
    state: &mut Box<dyn Any>,
    cx: &mut RebuildCx<'_, '_>,
    data: &mut T,
    old: &dyn AnyView<T>,
)
 
fn dyn_rebuild( &mut self, state: &mut Box<dyn Any>, cx: &mut RebuildCx<'_, '_>, data: &mut T, old: &dyn AnyView<T>, )
Rebuild the view.
Source§fn dyn_event(
    &mut self,
    state: &mut Box<dyn Any>,
    cx: &mut EventCx<'_, '_>,
    data: &mut T,
    event: &Event,
) -> bool
 
fn dyn_event( &mut self, state: &mut Box<dyn Any>, cx: &mut EventCx<'_, '_>, data: &mut T, event: &Event, ) -> bool
Handle an event.
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