DataSnapshot
public extension DataSnapshot-
Retrieves the value of a snapshot and converts it to an instance of caller-specified type. Throws
DecodingError.valueNotFoundif the document does not exist andTis not anOptional.See
Database.Decoderfor more details about the decoding process.Declaration
Swift
func data<T: Decodable>(as type: T.Type, decoder: Database.Decoder = Database.Decoder()) throws -> T