Stay organized with collections
Save and categorize content based on your preferences.
DocumentIDWrappable
publicprotocolDocumentIDWrappable
A type that can initialize itself from a Firestore DocumentReference,
which makes it suitable for use with the @DocumentID property wrapper.
Firestore includes extensions that make String and DocumentReference
conform to DocumentIDWrappable.
Note that Firestore ignores fields annotated with @DocumentID when writing
so there is no requirement to convert from the wrapped type back to a
DocumentReference.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2022-05-11 UTC."],[],[],null,["# FirebaseFirestoreSwift Framework Reference\n\nDocumentIDWrappable\n===================\n\n public protocol DocumentIDWrappable\n\nA type that can initialize itself from a Firestore `DocumentReference`,\nwhich makes it suitable for use with the [@DocumentID](../Structs/DocumentID.html) property wrapper.\n\nFirestore includes extensions that make `String` and `DocumentReference`\nconform to `DocumentIDWrappable`.\n\nNote that Firestore ignores fields annotated with [@DocumentID](../Structs/DocumentID.html) when writing\nso there is no requirement to convert from the wrapped type back to a\n`DocumentReference`.\n- `\n ``\n ``\n `\n\n ### [wrap(_:)](#/s:22FirebaseFirestoreSwift19DocumentIDWrappableP4wrapyxSo20FIRDocumentReferenceCKFZ)\n\n `\n ` \n Creates a new instance by converting from the given `DocumentReference`. \n\n #### Declaration\n\n Swift \n\n static func wrap(_ documentReference: DocumentReference) throws -\u003e Self"]]