pub struct StateChanges {
pub changes: Vec<StateChange>,
pub batch_timestamp: Instant,
pub immediate: bool,
}
Expand description
Collection of state changes for batching
Fields§
§changes: Vec<StateChange>
List of individual changes
batch_timestamp: Instant
When the batch was created
immediate: bool
Whether this batch requires immediate processing
Implementations§
Source§impl StateChanges
impl StateChanges
Sourcepub fn new(changes: Vec<StateChange>, immediate: bool) -> Self
pub fn new(changes: Vec<StateChange>, immediate: bool) -> Self
Create a new state changes batch
Sourcepub fn changes_for_field(&self, field_name: &str) -> Vec<&StateChange>
pub fn changes_for_field(&self, field_name: &str) -> Vec<&StateChange>
Get changes affecting a specific field
Sourcepub fn has_critical_changes(&self) -> bool
pub fn has_critical_changes(&self) -> bool
Check if this batch contains critical changes
Sourcepub fn sort_by_priority(&mut self)
pub fn sort_by_priority(&mut self)
Sort changes by priority
Trait Implementations§
Source§impl Clone for StateChanges
impl Clone for StateChanges
Source§fn clone(&self) -> StateChanges
fn clone(&self) -> StateChanges
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 moreAuto Trait Implementations§
impl Freeze for StateChanges
impl RefUnwindSafe for StateChanges
impl Send for StateChanges
impl Sync for StateChanges
impl Unpin for StateChanges
impl UnwindSafe for StateChanges
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