pub struct FrameOutput {
pub exit: bool,
pub swap_buffers: bool,
pub wait_next_event: bool,
}Expand description
Output from the rendering to the default Window each frame.
Fields§
§exit: boolIf this is true:
- On desktop, the window is closed and the renderloop is stopped.
- On web, the render loop is stopped, the event handlers are removed and the
Windowdropped. Note that the canvas is not removed.
swap_buffers: boolSwaps the back and front buffer if this is true. Set this to true if something have been rendered this frame and you want to display it. Set it to false if nothing have been rendered this frame, for example if nothing has changed, and you want to reuse the image from an old frame. Currently ignored on web, since it does not use double buffering.
wait_next_event: boolWhether to stop the render loop until next event.
Trait Implementations§
Source§impl Clone for FrameOutput
Available on crate feature window only.
impl Clone for FrameOutput
Available on crate feature
window only.Source§fn clone(&self) -> FrameOutput
fn clone(&self) -> FrameOutput
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FrameOutput
Available on crate feature window only.
impl Debug for FrameOutput
Available on crate feature
window only.Auto Trait Implementations§
impl Freeze for FrameOutput
impl RefUnwindSafe for FrameOutput
impl Send for FrameOutput
impl Sync for FrameOutput
impl Unpin for FrameOutput
impl UnwindSafe for FrameOutput
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