Operatorswift-mongodb 0.27.0BSONABI
<(_:_:)
Compares the bytes of this identifier in lexicographical order. This is the same as performing a lexicographic numeric comparison on (timestamp
, middle
, low
). Depending on platform endianness, this may be different from performing a lexicographic numeric comparison on bitPattern
directly.
static func < (lhs: `Self`, rhs: `Self`) -> Bool
Other members in extension
Typealiases
Type members
init(UInt32, UInt32, UInt32
) Creates an identifier with the given high-, middle-, and low-components. The components are interpreted by platform endianness; therefore the values stored into
bitPattern
may be different if the current host is not big-endian.init(integerLiteral: StaticBigInt
) init(timestamp: UInt32, seed: Seed, ordinal: Ordinal
) init(with: (_ memory: UnsafeMutableRawBufferPointer) throws -> ()
) rethrows Creates an identifier by delegating to the closure to initialize raw memory. The buffer contains 12 bytes and will be interpreted as a 96-bit, big-endian integer.
static func == (lhs: `Self`, rhs: `Self`
) -> Bool
Instance members
let bitPattern: (UInt32, UInt32, UInt32)
var description: String
var low: UInt32
The low 32 bits of this identifier. The high byte of this integer is the byte at offset +8 of this identifier.
var middle: UInt32
The middle 32 bits of this identifier. The high byte of this integer is the byte at offset +4 of this identifier.
var ordinal: Ordinal
The last three bytes of this identifier. The first tuple element is the byte at offset +9 of this identifier.
var seed: Seed
The middle five bytes of this identifier. The first tuple element is the byte at offset +4 of this identifier.
var timestamp: UInt32
The high 32 bits of this identifier. The high byte of this integer is the byte at offset +0 of this identifier.
func hash(into: inout Hasher
) Hashes the bytes of this identifier in the order they are stored in memory.