Timestamp

public struct Timestamp : BSONValue, Equatable, Codable

A struct to represent the BSON Timestamp type.

  • Declaration

    Swift

    public var bsonType: BSONType { get }
  • A timestamp representing seconds since the Unix epoch.

    Declaration

    Swift

    public let timestamp: UInt32
  • An incrementing ordinal for operations within a given second.

    Declaration

    Swift

    public let increment: UInt32
  • Initializes a new Timestamp with the provided timestamp and increment values.

    Declaration

    Swift

    public init(timestamp: UInt32, inc: UInt32)
  • Initializes a new Timestamp with the provided timestamp and increment values. Assumes the values can successfully be converted to UInt32s without loss of precision.

    Declaration

    Swift

    public init(timestamp: Int, inc: Int)
  • Declaration

    Swift

    public init(from decoder: Decoder) throws
  • Declaration

    Swift

    public func encode(to: Encoder) throws
  • Declaration

    Swift

    public func encode(to storage: DocumentStorage, forKey key: String) throws
  • Declaration

    Swift

    public static func from(iterator iter: DocumentIterator) throws -> Timestamp