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 Freeze for ViewData
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