firestore-path
A Firestore path helper.
Examples
use ;
use FromStr;
let project_id = from_str?;
let database_id = from_str?;
let database_name = new;
assert_eq!;
// assert_eq!(
// DatabaseName::from_project_id("my-project")?.to_string(),
// "projects/my-project/databases/(default)"
// );
let root_document_name: RootDocumentName = database_name.root_document_name;
assert_eq!;
let collection_name: CollectionName = root_document_name.collection?;
assert_eq!;
assert_eq!;
let document_name: DocumentName = collection_name.doc?;
assert_eq!;
assert_eq!;
assert_eq!;
let collection_id = from_str?;
let collection_path = from;
assert_eq!;
let document_id = from_str?;
let document_path: DocumentPath = collection_path.doc?;
assert_eq!;
let child_document_name = document_name.doc?;
assert_eq!;
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.