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
sourceimpl 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<'_>ⓘNotable traits for DocumentChangesIter<'a>impl<'a> Iterator for DocumentChangesIter<'a> type Item = (&'a CollectionName, &'a ChangedDocument);
pub const fn iter(&self) -> DocumentChangesIter<'_>ⓘNotable traits for DocumentChangesIter<'a>impl<'a> Iterator for DocumentChangesIter<'a> type Item = (&'a CollectionName, &'a ChangedDocument);
Returns an interator over all of the changed documents.
Trait Implementations
sourceimpl Clone for DocumentChanges
impl Clone for DocumentChanges
sourcefn clone(&self) -> DocumentChanges
fn clone(&self) -> DocumentChanges
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for DocumentChanges
impl Debug for DocumentChanges
sourceimpl<'de> Deserialize<'de> for DocumentChanges
impl<'de> Deserialize<'de> for DocumentChanges
sourcefn 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
sourceimpl IntoIterator for DocumentChanges
impl IntoIterator for DocumentChanges
type Item = (CollectionName, ChangedDocument)
type Item = (CollectionName, ChangedDocument)
The type of the elements being iterated over.
type IntoIter = DocumentChangesIntoIter
type IntoIter = DocumentChangesIntoIter
Which kind of iterator are we turning this into?
sourceimpl Serialize for DocumentChanges
impl Serialize for DocumentChanges
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more