pub enum UpdateOperation {
Replace(Box<ReplaceUpdateData>),
SetEntry(Box<SetEntryUpdateData>),
DeleteEntry(Box<DeleteEntryUpdateData>),
Clear,
AppendEntry(Box<AppendEntryUpdateData>),
ListSplice(Box<ListSpliceUpdateData>),
Increment(Box<IncrementUpdateData>),
Decrement(Box<DecrementUpdateData>),
}Variants§
Replace(Box<ReplaceUpdateData>)
Represents a replacement operation for a value.
SetEntry(Box<SetEntryUpdateData>)
Represents an update to a specific property of a value.
The key specifies which property to update, and value is the new value for that property.
DeleteEntry(Box<DeleteEntryUpdateData>)
Represents the removal of a specific property from a value.
Clear
Represents clearing all elements from a collection-type value (like an array or map).
AppendEntry(Box<AppendEntryUpdateData>)
Represents adding a new element to a collection-type value (like an array or map).
ListSplice(Box<ListSpliceUpdateData>)
Special update operation for list values that allows splicing
Increment(Box<IncrementUpdateData>)
Increment operation for numeric values
Decrement(Box<DecrementUpdateData>)
Decrement operation for numeric values
Implementations§
Source§impl UpdateOperation
impl UpdateOperation
pub fn replace(value: ValueContainer) -> Self
pub fn set_entry(key: ValueContainer, value: ValueContainer) -> Self
pub fn delete_entry(key: ValueContainer) -> Self
pub fn clear() -> Self
pub fn append_entry(value: ValueContainer) -> Self
pub fn list_splice( start_index: u32, delete_count: u32, items_to_insert: Vec<ValueContainer>, ) -> Self
pub fn increment(amount: ValueContainer) -> Self
pub fn decrement(amount: ValueContainer) -> Self
Source§impl UpdateOperation
impl UpdateOperation
Sourcepub fn with_source(
self,
source_id: TransceiverId,
path: Vec<ValueContainer>,
) -> Update
pub fn with_source( self, source_id: TransceiverId, path: Vec<ValueContainer>, ) -> Update
Creates a new Update struct with the given TransceiverId as source id.
Sourcepub fn with_source_root(self, source_id: TransceiverId) -> Update
pub fn with_source_root(self, source_id: TransceiverId) -> Update
Creates a new Update struct with the given TransceiverId as source id and an empty path.
Trait Implementations§
Source§impl AsRef<str> for UpdateOperation
impl AsRef<str> for UpdateOperation
Source§impl Clone for UpdateOperation
impl Clone for UpdateOperation
Source§impl Debug for UpdateOperation
impl Debug for UpdateOperation
Source§impl Hash for UpdateOperation
impl Hash for UpdateOperation
Source§impl PartialEq for UpdateOperation
impl PartialEq for UpdateOperation
impl StructuralPartialEq for UpdateOperation
Source§impl ToInstructions for UpdateOperation
Appends a single update operation on a shared container
impl ToInstructions for UpdateOperation
Appends a single update operation on a shared container
fn to_instructions<'a>( &'a self, visitor: &'a mut dyn ValueVisitor, cache: &'a mut SharedReferencesCache, ) -> Box<dyn Iterator<Item = Instruction> + 'a>
Auto Trait Implementations§
impl !RefUnwindSafe for UpdateOperation
impl !Send for UpdateOperation
impl !Sync for UpdateOperation
impl !UnwindSafe for UpdateOperation
impl Forget for UpdateOperation
impl Freeze for UpdateOperation
impl Move for UpdateOperation
impl Unpin for UpdateOperation
impl UnsafeUnpin for UpdateOperation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more