pub struct FirestoreUpdateDocObjBuilder<'a, D>where
D: FirestoreUpdateSupport,{ /* private fields */ }Expand description
A builder for specifying the document ID and data for an update operation.
This stage allows setting the document data (as a raw Document or a serializable object),
preconditions, field transformations, and which fields to return after the update.
Implementations§
Source§impl<'a, D> FirestoreUpdateDocObjBuilder<'a, D>where
D: FirestoreUpdateSupport,
impl<'a, D> FirestoreUpdateDocObjBuilder<'a, D>where
D: FirestoreUpdateSupport,
Sourcepub fn return_only_fields<I>(self, return_only_fields: I) -> Self
pub fn return_only_fields<I>(self, return_only_fields: I) -> Self
Sourcepub fn precondition(self, precondition: FirestoreWritePrecondition) -> Self
pub fn precondition(self, precondition: FirestoreWritePrecondition) -> Self
Specifies a precondition for the update operation.
The update will only be executed if the precondition is met.
§Arguments
precondition: TheFirestoreWritePreconditionto apply.
§Returns
The builder instance with the precondition set.
Sourcepub fn transforms<FN>(self, doc_transform: FN) -> Self
pub fn transforms<FN>(self, doc_transform: FN) -> Self
Specifies server-side field transformations to apply as part of the update.
The doc_transform argument is a closure that receives a FirestoreTransformBuilder
and should return a Vec<FirestoreFieldTransform>.
§Arguments
doc_transform: A closure to build the list of field transformations.
§Returns
The builder instance with the field transformations set.
Sourcepub fn document(
self,
document: Document,
) -> FirestoreUpdateDocExecuteBuilder<'a, D>
pub fn document( self, document: Document, ) -> FirestoreUpdateDocExecuteBuilder<'a, D>
Specifies the document data to update using a raw Document.
The document.name field should contain the full path to the document.
§Arguments
document: The FirestoreDocumentcontaining the fields to update.
§Returns
A FirestoreUpdateDocExecuteBuilder to execute the operation.
Sourcepub fn document_id<S>(
self,
document_id: S,
) -> FirestoreUpdateObjInitExecuteBuilder<'a, D>
pub fn document_id<S>( self, document_id: S, ) -> FirestoreUpdateObjInitExecuteBuilder<'a, D>
Specifies the ID of the document to update.
This transitions the builder to expect a Rust object for the update data.
§Arguments
document_id: The ID of the document to update.
§Returns
A FirestoreUpdateObjInitExecuteBuilder to specify the object and execute.
Trait Implementations§
Source§impl<'a, D> Clone for FirestoreUpdateDocObjBuilder<'a, D>where
D: FirestoreUpdateSupport + Clone,
impl<'a, D> Clone for FirestoreUpdateDocObjBuilder<'a, D>where
D: FirestoreUpdateSupport + Clone,
Source§fn clone(&self) -> FirestoreUpdateDocObjBuilder<'a, D>
fn clone(&self) -> FirestoreUpdateDocObjBuilder<'a, D>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'a, D> Freeze for FirestoreUpdateDocObjBuilder<'a, D>
impl<'a, D> RefUnwindSafe for FirestoreUpdateDocObjBuilder<'a, D>where
D: RefUnwindSafe,
impl<'a, D> Send for FirestoreUpdateDocObjBuilder<'a, D>where
D: Sync,
impl<'a, D> Sync for FirestoreUpdateDocObjBuilder<'a, D>where
D: Sync,
impl<'a, D> Unpin for FirestoreUpdateDocObjBuilder<'a, D>
impl<'a, D> UnwindSafe for FirestoreUpdateDocObjBuilder<'a, D>where
D: RefUnwindSafe,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request