pub struct ViewData { /* private fields */ }Expand description
Represents the content to be rendered to the View.
Implementations
sourceimpl ViewData
impl ViewData
sourcepub fn new<C>(callback: C) -> Self where
C: FnOnce(&mut ViewDataUpdater<'_>),
pub fn new<C>(callback: C) -> Self where
C: FnOnce(&mut ViewDataUpdater<'_>),
Create a new instance using a ViewDataUpdater.
sourcepub fn update_view_data<C>(&mut self, callback: C) where
C: FnOnce(&mut ViewDataUpdater<'_>),
pub fn update_view_data<C>(&mut self, callback: C) where
C: FnOnce(&mut ViewDataUpdater<'_>),
Update the view data using a ViewDataUpdater. This allows for batch updating of the ViewData.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ViewData
impl Send for ViewData
impl Sync for ViewData
impl Unpin for ViewData
impl UnwindSafe for ViewData
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more