pub struct Scheduler {
pub needs_layout: bool,
pub needs_paint: bool,
}Expand description
Pending layout and paint work for a frame.
Layout implies paint when marked through Self::mark_layout, but the
public fields permit callers to represent any combination. Default
equals Self::clear.
§Examples
use ailloli_ui_runtime::app::Scheduler;
let scheduler = Scheduler::default();
assert!(!scheduler.needs_layout && !scheduler.needs_paint);Fields§
§needs_layout: boolWhether retained layout should be recomputed.
needs_paint: boolWhether a new scene should be painted.
Implementations§
Source§impl Scheduler
Provides the operations defined for Scheduler.
impl Scheduler
Provides the operations defined for Scheduler.
Sourcepub fn mark_layout(&mut self)
pub fn mark_layout(&mut self)
Marks both layout and its required follow-up paint as pending.
Calling this repeatedly is idempotent.
§Examples
use ailloli_ui_runtime::app::Scheduler;
let mut scheduler = Scheduler::default();
scheduler.mark_layout();
assert!(scheduler.needs_layout && scheduler.needs_paint);Sourcepub fn mark_paint(&mut self)
pub fn mark_paint(&mut self)
Marks paint pending without changing the layout flag.
§Examples
use ailloli_ui_runtime::app::Scheduler;
let mut scheduler = Scheduler::default();
scheduler.mark_paint();
assert!(!scheduler.needs_layout && scheduler.needs_paint);Trait Implementations§
Auto Trait Implementations§
impl Freeze for Scheduler
impl RefUnwindSafe for Scheduler
impl Send for Scheduler
impl Sync for Scheduler
impl Unpin for Scheduler
impl UnwindSafe for Scheduler
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§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
Source§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.