pub struct FirestoreWriteResult {
pub update_time: Option<DateTime<Utc>>,
pub transform_results: Vec<FirestoreValue>,
}
Expand description
The result of a Firestore write operation (create, update, delete).
This struct provides information about the outcome of a write, such as the document’s update time and the results of any field transformations that were applied.
Fields§
§update_time: Option<DateTime<Utc>>
The time at which the document was last updated after this write operation.
This is None
if the write operation did not result in a changed document
(e.g., deleting a non-existent document, or an update that didn’t change any values).
transform_results: Vec<FirestoreValue>
A list of values that are the result of applying field transformations.
Each FirestoreValue
in this list corresponds to a
FirestoreFieldTransform
applied in the write request.
The order of results matches the order of transformations in the request.
For example, if an Increment
transform was used, this would contain the new
value of the incremented field.
Implementations§
Source§impl FirestoreWriteResult
impl FirestoreWriteResult
pub fn new(transform_results: Vec<FirestoreValue>) -> Self
pub fn update_time(&mut self, value: DateTime<Utc>) -> &mut Self
pub fn reset_update_time(&mut self) -> &mut Self
pub fn mopt_update_time(&mut self, value: Option<DateTime<Utc>>) -> &mut Self
pub fn with_update_time(self, value: DateTime<Utc>) -> Self
pub fn without_update_time(self) -> Self
pub fn opt_update_time(self, value: Option<DateTime<Utc>>) -> Self
pub fn transform_results(&mut self, value: Vec<FirestoreValue>) -> &mut Self
pub fn with_transform_results(self, value: Vec<FirestoreValue>) -> Self
Trait Implementations§
Source§impl Clone for FirestoreWriteResult
impl Clone for FirestoreWriteResult
Source§fn clone(&self) -> FirestoreWriteResult
fn clone(&self) -> FirestoreWriteResult
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for FirestoreWriteResult
impl Debug for FirestoreWriteResult
Source§impl From<FirestoreWriteResultInit> for FirestoreWriteResult
impl From<FirestoreWriteResultInit> for FirestoreWriteResult
Source§fn from(value: FirestoreWriteResultInit) -> Self
fn from(value: FirestoreWriteResultInit) -> Self
Source§impl PartialEq for FirestoreWriteResult
impl PartialEq for FirestoreWriteResult
Source§impl TryInto<FirestoreWriteResult> for WriteResult
impl TryInto<FirestoreWriteResult> for WriteResult
Source§type Error = FirestoreError
type Error = FirestoreError
impl StructuralPartialEq for FirestoreWriteResult
Auto Trait Implementations§
impl Freeze for FirestoreWriteResult
impl RefUnwindSafe for FirestoreWriteResult
impl Send for FirestoreWriteResult
impl Sync for FirestoreWriteResult
impl Unpin for FirestoreWriteResult
impl UnwindSafe for FirestoreWriteResult
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