pub trait GroveDbOpBatchV0Methods {
Show 18 methods
// Required methods
fn new() -> Self;
fn len(&self) -> usize;
fn is_empty(&self) -> bool;
fn push(&mut self, op: QualifiedGroveDbOp);
fn append(&mut self, other: &mut Self);
fn extend<I: IntoIterator<Item = QualifiedGroveDbOp>>(
&mut self,
other_ops: I,
);
fn from_operations(operations: Vec<QualifiedGroveDbOp>) -> Self;
fn add_insert_empty_tree(&mut self, path: Vec<Vec<u8>>, key: Vec<u8>);
fn add_insert_empty_tree_with_flags(
&mut self,
path: Vec<Vec<u8>>,
key: Vec<u8>,
storage_flags: &Option<Cow<'_, StorageFlags>>,
);
fn add_insert_empty_sum_tree(&mut self, path: Vec<Vec<u8>>, key: Vec<u8>);
fn add_insert_empty_sum_tree_with_flags(
&mut self,
path: Vec<Vec<u8>>,
key: Vec<u8>,
storage_flags: &Option<Cow<'_, StorageFlags>>,
);
fn add_delete(&mut self, path: Vec<Vec<u8>>, key: Vec<u8>);
fn add_delete_tree(
&mut self,
path: Vec<Vec<u8>>,
key: Vec<u8>,
tree_type: TreeType,
);
fn add_insert(&mut self, path: Vec<Vec<u8>>, key: Vec<u8>, element: Element);
fn verify_consistency_of_operations(&self) -> GroveDbOpConsistencyResults;
fn contains<'c, P>(&self, path: P, key: &[u8]) -> Option<&GroveOp>
where P: IntoIterator<Item = &'c [u8]>,
<P as IntoIterator>::IntoIter: ExactSizeIterator + DoubleEndedIterator + Clone;
fn remove<'c, P>(&mut self, path: P, key: &[u8]) -> Option<GroveOp>
where P: IntoIterator<Item = &'c [u8]>,
<P as IntoIterator>::IntoIter: ExactSizeIterator + DoubleEndedIterator + Clone;
fn remove_if_insert(
&mut self,
path: Vec<Vec<u8>>,
key: &[u8],
) -> Option<GroveOp>;
}Expand description
Trait defining a batch of GroveDB operations.
Required Methods§
Sourcefn extend<I: IntoIterator<Item = QualifiedGroveDbOp>>(&mut self, other_ops: I)
fn extend<I: IntoIterator<Item = QualifiedGroveDbOp>>(&mut self, other_ops: I)
Extend operations into a list of GroveDB ops.
Sourcefn from_operations(operations: Vec<QualifiedGroveDbOp>) -> Self
fn from_operations(operations: Vec<QualifiedGroveDbOp>) -> Self
Puts a list of GroveDB operations into a batch.
Sourcefn add_insert_empty_tree(&mut self, path: Vec<Vec<u8>>, key: Vec<u8>)
fn add_insert_empty_tree(&mut self, path: Vec<Vec<u8>>, key: Vec<u8>)
Adds an Insert operation with an empty tree at the specified path and key to a list of GroveDB ops.
Sourcefn add_insert_empty_tree_with_flags(
&mut self,
path: Vec<Vec<u8>>,
key: Vec<u8>,
storage_flags: &Option<Cow<'_, StorageFlags>>,
)
fn add_insert_empty_tree_with_flags( &mut self, path: Vec<Vec<u8>>, key: Vec<u8>, storage_flags: &Option<Cow<'_, StorageFlags>>, )
Adds an Insert operation with an empty tree with storage flags to a list of GroveDB ops.
Sourcefn add_insert_empty_sum_tree(&mut self, path: Vec<Vec<u8>>, key: Vec<u8>)
fn add_insert_empty_sum_tree(&mut self, path: Vec<Vec<u8>>, key: Vec<u8>)
Adds an Insert operation with an empty sum tree at the specified path and key to a list of GroveDB ops.
Sourcefn add_insert_empty_sum_tree_with_flags(
&mut self,
path: Vec<Vec<u8>>,
key: Vec<u8>,
storage_flags: &Option<Cow<'_, StorageFlags>>,
)
fn add_insert_empty_sum_tree_with_flags( &mut self, path: Vec<Vec<u8>>, key: Vec<u8>, storage_flags: &Option<Cow<'_, StorageFlags>>, )
Adds an Insert operation with an empty sum tree with storage flags to a list of GroveDB ops.
Sourcefn add_delete(&mut self, path: Vec<Vec<u8>>, key: Vec<u8>)
fn add_delete(&mut self, path: Vec<Vec<u8>>, key: Vec<u8>)
Adds a Delete operation to a list of GroveDB ops.
Sourcefn add_delete_tree(
&mut self,
path: Vec<Vec<u8>>,
key: Vec<u8>,
tree_type: TreeType,
)
fn add_delete_tree( &mut self, path: Vec<Vec<u8>>, key: Vec<u8>, tree_type: TreeType, )
Adds a Delete tree operation to a list of GroveDB ops.
Sourcefn add_insert(&mut self, path: Vec<Vec<u8>>, key: Vec<u8>, element: Element)
fn add_insert(&mut self, path: Vec<Vec<u8>>, key: Vec<u8>, element: Element)
Adds an Insert operation with an element to a list of GroveDB ops.
Sourcefn verify_consistency_of_operations(&self) -> GroveDbOpConsistencyResults
fn verify_consistency_of_operations(&self) -> GroveDbOpConsistencyResults
Verify consistency of operations
Sourcefn contains<'c, P>(&self, path: P, key: &[u8]) -> Option<&GroveOp>where
P: IntoIterator<Item = &'c [u8]>,
<P as IntoIterator>::IntoIter: ExactSizeIterator + DoubleEndedIterator + Clone,
fn contains<'c, P>(&self, path: P, key: &[u8]) -> Option<&GroveOp>where
P: IntoIterator<Item = &'c [u8]>,
<P as IntoIterator>::IntoIter: ExactSizeIterator + DoubleEndedIterator + Clone,
Sourcefn remove<'c, P>(&mut self, path: P, key: &[u8]) -> Option<GroveOp>where
P: IntoIterator<Item = &'c [u8]>,
<P as IntoIterator>::IntoIter: ExactSizeIterator + DoubleEndedIterator + Clone,
fn remove<'c, P>(&mut self, path: P, key: &[u8]) -> Option<GroveOp>where
P: IntoIterator<Item = &'c [u8]>,
<P as IntoIterator>::IntoIter: ExactSizeIterator + DoubleEndedIterator + Clone,
Sourcefn remove_if_insert(
&mut self,
path: Vec<Vec<u8>>,
key: &[u8],
) -> Option<GroveOp>
fn remove_if_insert( &mut self, path: Vec<Vec<u8>>, key: &[u8], ) -> Option<GroveOp>
Find and remove a specific path and key from the batch if it is an
GroveOp::InsertOrReplace, GroveOp::Replace, or GroveOp::Patch. Return the found Op regardless of whether it was removed.
§Arguments
path- The path to search for.key- The key to search for.
§Returns
Option<Op>- Returns the foundOpif it exists. If theOpis anGroveOp::InsertOrReplace,GroveOp::Replace, orGroveOp::Patch, it will be removed from the batch.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".