Struct tiny_firestore_odm::Collection [−][src]
pub struct Collection<T> where
T: Serialize + DeserializeOwned + 'static, { /* fields omitted */ }
Expand description
Represents a collection of documents in a Firestore database.
Documents in Firestore do not have types, but on the Rust end, we associate each collection with a type. Documents are serialized into and deserialized from this type when writing/reading to Firestore.
Implementations
Construct a top-level collection (i.e. a collection whose parent is the root.)
Returns a stream of all of the documents in a collection (as NamedDocuments).
Create the given document in this collection with the given key.
Returns an error if the key is already in use (if you intend to replace the
document in that case, use upsert
instead.)
Create the given document in this collection with the given key.
Returns true
if the document was created, or false
if it already existed.
Add the given document to this collection, assigning it a new key at random.
Overwrite the given document to this collection, creating a new document if one does not exist.
Update the given document, returning an error if it does not exist.
Get the document with a given key.
Delete the document with a given key.
Auto Trait Implementations
impl<T> !RefUnwindSafe for Collection<T>
impl<T> Send for Collection<T> where
T: Send,
impl<T> Sync for Collection<T> where
T: Sync,
impl<T> Unpin for Collection<T> where
T: Unpin,
impl<T> !UnwindSafe for Collection<T>
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T
in a tonic::Request
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more