pub struct Render<Ev> { /* private fields */ }
Expand description
Use an instance of Render
to notify the Shell that it should update the user
interface. This assumes a declarative UI framework is used in the Shell, which will
take the ViewModel provided by Core::view
and reconcile the new UI state based
on the view model with the previous one.
For imperative UIs, the Shell will need to understand the difference between the two view models and update the user interface accordingly.
Implementations§
source§impl<Ev> Render<Ev>where
Ev: 'static,
impl<Ev> Render<Ev>where
Ev: 'static,
Public API of the capability, called by App::update.
pub fn new(context: CapabilityContext<RenderOperation, Ev>) -> Self
sourcepub fn render(&self)
pub fn render(&self)
Call render
from App::update
to signal to the Shell that
UI should be re-drawn.
Trait Implementations§
source§impl<Ev> Capability<Ev> for Render<Ev>
impl<Ev> Capability<Ev> for Render<Ev>
type Operation = RenderOperation
type MappedSelf<MappedEv> = Render<MappedEv>
fn map_event<F, NewEv>(&self, f: F) -> Self::MappedSelf<NewEv>
Auto Trait Implementations§
impl<Ev> Freeze for Render<Ev>
impl<Ev> !RefUnwindSafe for Render<Ev>
impl<Ev> Send for Render<Ev>
impl<Ev> Sync for Render<Ev>
impl<Ev> Unpin for Render<Ev>
impl<Ev> !UnwindSafe for Render<Ev>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)