Subtype
public struct Subtype : Equatable, Hashable, RawRepresentable, Codable
Subtypes for BSON Binary values.
-
Generic binary subtype
Declaration
Swift
public static let generic: BSONBinary.Subtype
-
A function
Declaration
Swift
public static let function: BSONBinary.Subtype
-
Binary (old)
Declaration
Swift
public static let binaryDeprecated: BSONBinary.Subtype
-
UUID (old)
Declaration
Swift
public static let uuidDeprecated: BSONBinary.Subtype
-
UUID (RFC 4122)
Declaration
Swift
public static let uuid: BSONBinary.Subtype
-
MD5
Declaration
Swift
public static let md5: BSONBinary.Subtype
-
Encrypted BSON value
Declaration
Swift
public static let encryptedValue: BSONBinary.Subtype
-
Column
Declaration
Swift
public static let column: BSONBinary.Subtype
-
Subtype indicator value
Declaration
Swift
public let rawValue: UInt8
-
Initializes a
Subtype
with a custom value. Returns nil if rawValue within reserved range [0x08, 0x80).Declaration
Swift
public init?(rawValue: UInt8)
-
Initializes a
Subtype
with a custom value. This value must be in the range 0x80-0xFF.Throws
BSONError.InvalidArgumentError
if value passed is outside of the range 0x80-0xFF
Declaration
Swift
public static func userDefined(_ value: Int) throws -> Subtype