pub struct ViewData { /* private fields */ }
Expand description
Represents the content to be rendered to the View
.
Implementations§
source§impl ViewData
impl ViewData
sourcepub fn new<C>(callback: C) -> Selfwhere
C: FnOnce(&mut ViewDataUpdater<'_>),
pub fn new<C>(callback: C) -> Selfwhere 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§
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