pub struct TypedDocumentSnapshot<C>where
C: FirestoreDataConverter,{ /* private fields */ }Expand description
Document snapshot carrying a converter for typed access.
Implementations§
Source§impl<C> TypedDocumentSnapshot<C>where
C: FirestoreDataConverter,
impl<C> TypedDocumentSnapshot<C>where
C: FirestoreDataConverter,
pub fn new(base: DocumentSnapshot, converter: Arc<C>) -> Self
pub fn exists(&self) -> bool
pub fn id(&self) -> &str
pub fn metadata(&self) -> &SnapshotMetadata
pub fn from_cache(&self) -> bool
pub fn has_pending_writes(&self) -> bool
pub fn reference( &self, firestore: Firestore, ) -> FirestoreResult<DocumentReference>
pub fn raw(&self) -> &DocumentSnapshot
pub fn into_raw(self) -> DocumentSnapshot
Sourcepub fn data(&self) -> FirestoreResult<Option<C::Model>>
pub fn data(&self) -> FirestoreResult<Option<C::Model>>
Returns the typed model using the embedded converter.
Trait Implementations§
Source§impl<C> Clone for TypedDocumentSnapshot<C>where
C: FirestoreDataConverter + Clone,
impl<C> Clone for TypedDocumentSnapshot<C>where
C: FirestoreDataConverter + Clone,
Source§fn clone(&self) -> TypedDocumentSnapshot<C>
fn clone(&self) -> TypedDocumentSnapshot<C>
Returns a duplicate 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 moreAuto Trait Implementations§
impl<C> Freeze for TypedDocumentSnapshot<C>
impl<C> RefUnwindSafe for TypedDocumentSnapshot<C>where
C: RefUnwindSafe,
impl<C> Send for TypedDocumentSnapshot<C>
impl<C> Sync for TypedDocumentSnapshot<C>
impl<C> Unpin for TypedDocumentSnapshot<C>
impl<C> UnwindSafe for TypedDocumentSnapshot<C>where
C: 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
Mutably borrows from an owned value. Read more