pub struct ChangeSetStack { /* private fields */ }Implementations§
Source§impl ChangeSetStack
impl ChangeSetStack
pub fn current_mut(&mut self) -> &mut EntityChangeSet
pub fn current(&self) -> Option<&EntityChangeSet>
pub fn push(&mut self)
pub fn pop(&mut self) -> Option<EntityChangeSet>
pub fn get(&self, key: &EntityKey, field: &str) -> Option<Value>
pub fn set(&mut self, key: EntityKey, field: impl Into<String>, value: Value)
pub fn clear_current(&mut self)
Sourcepub fn clear_entity(&mut self, key: &EntityKey)
pub fn clear_entity(&mut self, key: &EntityKey)
Remove all pending changes for a specific entity key across all stack levels.
Sourcepub fn changed_field_names(&self, key: &EntityKey) -> BTreeSet<String>
pub fn changed_field_names(&self, key: &EntityKey) -> BTreeSet<String>
Get the union of all changed field names for a given entity key across all stack levels.
This is the Rust equivalent of Java’s entity.getUpdatedProperties().
Trait Implementations§
Source§impl Clone for ChangeSetStack
impl Clone for ChangeSetStack
Source§fn clone(&self) -> ChangeSetStack
fn clone(&self) -> ChangeSetStack
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ChangeSetStack
impl Debug for ChangeSetStack
Source§impl Default for ChangeSetStack
impl Default for ChangeSetStack
Source§fn default() -> ChangeSetStack
fn default() -> ChangeSetStack
Returns the “default value” for a type. Read more
Source§impl PartialEq for ChangeSetStack
impl PartialEq for ChangeSetStack
Source§fn eq(&self, other: &ChangeSetStack) -> bool
fn eq(&self, other: &ChangeSetStack) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ChangeSetStack
Auto Trait Implementations§
impl Freeze for ChangeSetStack
impl RefUnwindSafe for ChangeSetStack
impl Send for ChangeSetStack
impl Sync for ChangeSetStack
impl Unpin for ChangeSetStack
impl UnsafeUnpin for ChangeSetStack
impl UnwindSafe for ChangeSetStack
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