BSONObjectID
public struct BSONObjectID : Equatable, Hashable, CustomStringConvertible
A struct to represent the BSON ObjectID type.
-
This
BSONObjectID‘s data represented as aString.Declaration
Swift
public var hex: String { get } -
Declaration
Swift
public var description: String { get } -
The timestamp portion of this
BSONObjectIDrepresented as aDate.Declaration
Swift
public var timestamp: Date { get } -
Initializes a new
BSONObjectID.Declaration
Swift
public init() -
Initializes an
BSONObjectIDfrom the provided hexString.Throws
BSONError.InvalidArgumentErrorif string passed is not a valid BSONObjectID
Declaration
Swift
public init(_ hex: String) throws -
Declaration
Swift
public init(from decoder: Decoder) throws -
Declaration
Swift
public func encode(to encoder: Encoder) throws
View on GitHub
Install in Dash
BSONObjectID Structure Reference