pub struct ModuleUpdateScheduler { /* private fields */ }
Expand description
Scheduler for batching component updates
This system allows components to request updates (re-renders) and batches them together for optimal performance. Updates can be prioritized to ensure critical UI elements are updated first.
Implementations§
Source§impl UpdateScheduler
impl UpdateScheduler
Sourcepub fn schedule_update(
&self,
component_id: ComponentId,
priority: UpdatePriority,
) -> Result<(), String>
pub fn schedule_update( &self, component_id: ComponentId, priority: UpdatePriority, ) -> Result<(), String>
Schedule a component for update with the given priority
Sourcepub fn process_updates<F>(&self, update_component: F) -> Result<usize, String>
pub fn process_updates<F>(&self, update_component: F) -> Result<usize, String>
Process all pending updates
Returns the number of components updated
Sourcepub fn has_pending_updates(&self) -> Result<bool, String>
pub fn has_pending_updates(&self) -> Result<bool, String>
Check if there are any pending updates
Sourcepub fn pending_update_count(&self) -> Result<usize, String>
pub fn pending_update_count(&self) -> Result<usize, String>
Get the number of pending updates
Sourcepub fn clear_updates(&self) -> Result<(), String>
pub fn clear_updates(&self) -> Result<(), String>
Clear all pending updates
Trait Implementations§
Source§impl Clone for UpdateScheduler
impl Clone for UpdateScheduler
Source§fn clone(&self) -> UpdateScheduler
fn clone(&self) -> UpdateScheduler
Returns a copy 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 UpdateScheduler
impl Debug for UpdateScheduler
Auto Trait Implementations§
impl Freeze for UpdateScheduler
impl RefUnwindSafe for UpdateScheduler
impl Send for UpdateScheduler
impl Sync for UpdateScheduler
impl Unpin for UpdateScheduler
impl UnwindSafe for UpdateScheduler
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<T> Event for T
impl<T> Event for T
Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert to Any for downcasting (mutable)
Source§fn event_type(&self) -> &'static str
fn event_type(&self) -> &'static str
Get the event type name
Source§impl<T> Props for T
impl<T> Props for T
Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert to mutable Any for downcasting