UUIDCodingStrategy
public enum UUIDCodingStrategy : RawRepresentable
Enum 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 UUIDs between their BSON representations and their representations in (non BSONDocument) Codable
types.
As per the BSON specification, the default strategy is to encode UUIDs as BSON binary types with the UUID
subtype.
See also
bsonspec.org-
Declaration
Swift
public typealias RawValue = (encoding: BSONEncoder.UUIDEncodingStrategy, decoding: BSONDecoder.UUIDDecodingStrategy) -
Encode/decode the
UUIDby deferring to its default encoding/decoding implementations.Declaration
Swift
case deferredToUUID -
Encode/decode the
UUIDto/from a BSON binary type (default).Declaration
Swift
case binary -
Declaration
Swift
public init?(rawValue: RawValue) -
Declaration
Swift
public var rawValue: RawValue { get }
View on GitHub
Install in Dash
UUIDCodingStrategy Enumeration Reference