Decoder
struct DecoderUndocumented
-
Undocumented
Declaration
Swift
public init() -
Returns an instance of specified type from a Firestore document.
If exists in
container, Firestore specific types are recognized, and passed through toDecodableimplementations. This means types below incontainerare directly supported:- GeoPoint
- Timestamp
DocumentReference
A type to decode a document to.
container: A Map keyed of String representing a Firestore document.
document: A reference to the Firestore Document that is being decoded.
Declaration
Swift
public func decode<T: Decodable>(_: T.Type, from container: Any, in document: DocumentReference? = nil) throws -> TParameters
containerA Map keyed of String representing a Firestore document.
documentA reference to the Firestore Document that is being decoded.
Return Value
An instance of specified type by the first parameter.