Static Methodswift-bson 0.3.1BSONABI
custom(code:)
Returns a custom binary subtype. Traps if code
is less than 0x80
.
static func custom(code: UInt8) -> BSON.BinarySubtype
Returns a custom binary subtype. Traps if code
is less than 0x80
.
static func custom(code: UInt8) -> BSON.BinarySubtype
s7BSONABI4BSONO13BinarySubtypeV6custom4codeAEs5UInt8V_tFZ
What are these?46U40
import BSONABI
Models the BSON type system and the binary interface of the BSON serialization format.
@frozen struct BinarySubtype
A BSON binary metatype. This type’s public API performs canonicalization and therefore instances of this type are safe to compare.
@frozen enum BSON
The namespace for all BSON types.
@frozen struct UInt8
An 8-bit unsigned integer value type.
init?(rawValue: UInt8)
Detects and normalizes a binary subtype from the given raw subtype code. Deprecated encodings (0x02
and 0x03
) will be normalized to their canonical encoding.
init(unchecked code: UInt8)
Initializes a binary subtype from an unchecked subtype code. Performs no normalization.
static var compressed: `Self` { get }
static var encrypted: `Self` { get }
static var function: `Self` { get }
static var generic: `Self` { get }
static var md5: `Self` { get }
static var uuid: `Self` { get }
let rawValue: UInt8