pub struct FirestoreWithMetadata<T> {
pub document: Option<T>,
pub metadata: FirestoreDocumentMetadata,
}Expand description
A container that pairs a document (or other data T) with its associated Firestore metadata.
This is often used in query responses where each document is accompanied by metadata like its read time, transaction ID (if applicable), and potentially query explanation metrics.
§Type Parameters
T: The type of the document or data being wrapped. Typicallygcloud_sdk::google::firestore::v1::Documentor a user-defined struct after deserialization.
Fields§
§document: Option<T>The document or data itself. This is an Option because some Firestore
operations (like a query that finds no results but still has metadata)
might not return a document.
metadata: FirestoreDocumentMetadataThe metadata associated with the document or operation.
Trait Implementations§
Source§impl<T: Clone> Clone for FirestoreWithMetadata<T>
impl<T: Clone> Clone for FirestoreWithMetadata<T>
Source§impl<T: Debug> Debug for FirestoreWithMetadata<T>
impl<T: Debug> Debug for FirestoreWithMetadata<T>
Source§impl<T: PartialEq> PartialEq for FirestoreWithMetadata<T>
impl<T: PartialEq> PartialEq for FirestoreWithMetadata<T>
impl<T: PartialEq> StructuralPartialEq for FirestoreWithMetadata<T>
Source§impl TryFrom<RunQueryResponse> for FirestoreWithMetadata<Document>
impl TryFrom<RunQueryResponse> for FirestoreWithMetadata<Document>
Source§type Error = FirestoreError
type Error = FirestoreError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl<T> Freeze for FirestoreWithMetadata<T>
impl<T> RefUnwindSafe for FirestoreWithMetadata<T>where
Option<T>: RefUnwindSafe,
impl<T> Send for FirestoreWithMetadata<T>
impl<T> Sync for FirestoreWithMetadata<T>
impl<T> Unpin for FirestoreWithMetadata<T>
impl<T> UnsafeUnpin for FirestoreWithMetadata<T>where
Option<T>: UnsafeUnpin,
impl<T> UnwindSafe for FirestoreWithMetadata<T>where
Option<T>: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
Wrap the input message
T in a tonic::Request