pub struct Ui<C: 'static + Component> { /* private fields */ }
Expand description
Wrapper for Ui
that adds wgpu rendering.
Requires the “wgpu” feature.
Implementations§
Methods from Deref<Target = Ui<C>>§
Sourcepub fn update_and_poll(
&mut self,
message: C::Message,
waker: Waker,
) -> Vec<C::Output>
pub fn update_and_poll( &mut self, message: C::Message, waker: Waker, ) -> Vec<C::Output>
Updates the root component with a message.
If the ui has any pending futures internally, they are polled using the waker. Returns output messages from the root component if the update or the poll yielded any.
It’s up to the user to make sure that the waker
will schedule a call to poll()
on this Ui
.
Sourcepub fn poll(&mut self, waker: Waker) -> Vec<C::Output>
pub fn poll(&mut self, waker: Waker) -> Vec<C::Output>
If the ui has any pending futures internally, this method will poll them using the waker. Returns output messages from the root component if the poll yielded any.
It’s up to the user to make sure that the waker
will schedule another call to poll()
.
Sourcepub fn resize(&mut self, viewport: Rectangle)
pub fn resize(&mut self, viewport: Rectangle)
Resizes the viewport. This forces the view to be rerendered.
Sourcepub fn needs_redraw(&self) -> bool
pub fn needs_redraw(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<C> !Freeze for Ui<C>
impl<C> !RefUnwindSafe for Ui<C>
impl<C> Send for Ui<C>
impl<C> !Sync for Ui<C>
impl<C> Unpin for Ui<C>
impl<C> !UnwindSafe for Ui<C>
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