Protocols
The following protocols are available globally.
-
A type that can initialize itself from a Firestore
DocumentReference, which makes it suitable for use with the@DocumentIDproperty wrapper.Firestore includes extensions that make
StringandDocumentReferenceconform toDocumentIDWrappable.Note that Firestore ignores fields annotated with
@DocumentIDwhen writing so there is no requirement to convert from the wrapped type back to aDocumentReference.Declaration
Swift
public protocol DocumentIDWrappable -
A type that can initialize itself from a Firestore Timestamp, which makes it suitable for use with the
@ServerTimestampproperty wrapper.Firestore includes extensions that make
TimestampandDateconform toServerTimestampWrappable.Declaration
Swift
public protocol ServerTimestampWrappable