pub struct EntityRoot { /* private fields */ }Implementations§
Source§impl EntityRoot
impl EntityRoot
pub fn push_change_set(&self)
pub fn pop_change_set(&self) -> Option<EntityChangeSet>
pub fn clear_current_change_set(&self)
pub fn set( &self, key: EntityKey, field: impl Into<String>, value: impl Into<Value>, )
pub fn get(&self, key: &EntityKey, field: &str) -> Option<Value>
pub fn current_change_set(&self) -> EntityChangeSet
Sourcepub fn set_comment(&self, comment: impl Into<String>)
pub fn set_comment(&self, comment: impl Into<String>)
Set an annotation comment on this entity root. The comment propagates through the graph save process for observability.
Sourcepub fn get_comment(&self) -> Option<String>
pub fn get_comment(&self) -> Option<String>
Get the annotation comment, if any.
Sourcepub fn mark_as_delete(&self, key: EntityKey)
pub fn mark_as_delete(&self, key: EntityKey)
Mark an entity as deleted. The next save() call will treat this entity
as a Remove operation in the graph save pipeline.
Any pending field changes for this entity are cleared — they are irrelevant
when the entity is being deleted.
Sourcepub fn is_marked_as_delete(&self, key: &EntityKey) -> bool
pub fn is_marked_as_delete(&self, key: &EntityKey) -> bool
Check whether an entity has been marked for deletion.
Trait Implementations§
Source§impl Clone for EntityRoot
impl Clone for EntityRoot
Source§fn clone(&self) -> EntityRoot
fn clone(&self) -> EntityRoot
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 EntityRoot
impl Debug for EntityRoot
Source§impl Default for EntityRoot
impl Default for EntityRoot
Source§fn default() -> EntityRoot
fn default() -> EntityRoot
Returns the “default value” for a type. Read more
Source§impl PartialEq for EntityRoot
impl PartialEq for EntityRoot
Auto Trait Implementations§
impl Freeze for EntityRoot
impl RefUnwindSafe for EntityRoot
impl Send for EntityRoot
impl Sync for EntityRoot
impl Unpin for EntityRoot
impl UnsafeUnpin for EntityRoot
impl UnwindSafe for EntityRoot
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