[−][src]Function firestore_db_and_auth::documents::write
pub fn write<'a, T, BEARER>(
auth: &'a BEARER,
path: &str,
document_id: Option<&str>,
document: &T
) -> Result<WriteResult> where
T: Serialize,
BEARER: FirebaseAuthBearer<'c>,
Write a document to a given collection.
Arguments
- 'auth' The authentication token
- 'path' The document path / collection; For example "my_collection" or "a/nested/collection"
- 'document_id' The document id. Make sure that you do not include the document id to the path argument.
- 'document' The document