DataCodingStrategy
public enum DataCodingStrategy : RawRepresentableEnum representing the various encoding/decoding strategy pairs for Dates.
 Set these on a MongoClient, MongoDatabase, or MongoCollection so that the strategies will be applied when
 converting Datas between their BSON representations and their representations in (non BSONDocument) Codable
 types.
As per the BSON specification, the default strategy is to encode Datas as BSON binary types with the generic
 binary subtype.
See also
bsonspec.org- 
                  
                  DeclarationSwift public typealias RawValue = (encoding: BSONEncoder.DataEncodingStrategy, decoding: BSONDecoder.DataDecodingStrategy)
- 
                  
                  Encode/decode the Databy deferring to its default encoding implementations.Note: The default encoding implementation attempts to encode the Dataas a[UInt8], but because BSON does not support integer types besidesInt32orInt64, it actually gets encoded to BSON as an[Int32]. This results in a space inefficient storage of theData(using 4 bytes of BSON storage per byte of data).DeclarationSwift case deferredToData
- 
                  
                  Encode/decode the Datato/from a BSON binary type (default).DeclarationSwift case binary
- 
                  
                  Encode the Datato/from a base64 encoded string.DeclarationSwift case base64
- 
                  
                  Encode the Databy using the givenencodeFunc. Decode theDataby using the givendecodeFunc. IfencodeFuncdoes not encode a value, an empty document will be encoded in its place.DeclarationSwift case custom(encodeFunc: (Data, Encoder) throws -> Void, decodeFunc: (Decoder) throws -> Data)
- 
                  
                  DeclarationSwift public init?(rawValue: RawValue)
- 
                  
                  DeclarationSwift public var rawValue: RawValue { get }
 View on GitHub
            View on GitHub
           Install in Dash
            Install in Dash
           DataCodingStrategy Enumeration Reference
      DataCodingStrategy Enumeration Reference