Struct bonsaidb_core::transaction::DocumentChanges
source · pub struct DocumentChanges {
pub collections: Vec<CollectionName>,
pub documents: Vec<ChangedDocument>,
}
Expand description
A list of changed documents.
Fields§
§collections: Vec<CollectionName>
All of the collections changed.
documents: Vec<ChangedDocument>
The individual document changes.
Implementations§
source§impl DocumentChanges
impl DocumentChanges
sourcepub fn get(&self, index: usize) -> Option<(&CollectionName, &ChangedDocument)>
pub fn get(&self, index: usize) -> Option<(&CollectionName, &ChangedDocument)>
Returns the changed document and the name of the collection the change happened to.
sourcepub const fn iter(&self) -> DocumentChangesIter<'_> ⓘ
pub const fn iter(&self) -> DocumentChangesIter<'_> ⓘ
Returns an interator over all of the changed documents.
Trait Implementations§
source§impl Clone for DocumentChanges
impl Clone for DocumentChanges
source§fn clone(&self) -> DocumentChanges
fn clone(&self) -> DocumentChanges
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 moresource§impl Debug for DocumentChanges
impl Debug for DocumentChanges
source§impl<'de> Deserialize<'de> for DocumentChanges
impl<'de> Deserialize<'de> for DocumentChanges
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a> IntoIterator for &'a DocumentChanges
impl<'a> IntoIterator for &'a DocumentChanges
§type IntoIter = DocumentChangesIter<'a>
type IntoIter = DocumentChangesIter<'a>
Which kind of iterator are we turning this into?
§type Item = (&'a CollectionName, &'a ChangedDocument)
type Item = (&'a CollectionName, &'a ChangedDocument)
The type of the elements being iterated over.
source§impl IntoIterator for DocumentChanges
impl IntoIterator for DocumentChanges
§type IntoIter = DocumentChangesIntoIter
type IntoIter = DocumentChangesIntoIter
Which kind of iterator are we turning this into?
§type Item = (CollectionName, ChangedDocument)
type Item = (CollectionName, ChangedDocument)
The type of the elements being iterated over.
Auto Trait Implementations§
impl RefUnwindSafe for DocumentChanges
impl Send for DocumentChanges
impl Sync for DocumentChanges
impl Unpin for DocumentChanges
impl UnwindSafe for DocumentChanges
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