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<DocumentChanges, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<DocumentChanges, <__D as Deserializer<'de>>::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§fn into_iter(self) -> <&'a DocumentChanges as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a DocumentChanges as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
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.
source§fn into_iter(self) -> <DocumentChanges as IntoIterator>::IntoIter
fn into_iter(self) -> <DocumentChanges as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
source§impl Serialize for DocumentChanges
impl Serialize for DocumentChanges
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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