Protocols

The following protocols are available globally.

  • A protocol for monitoring events to implement, specifying their type and name.

    See more

    Declaration

    Swift

    public protocol MongoEvent
  • A protocol all types representing BSONTypes must implement.

    See more

    Declaration

    Swift

    public protocol BSONValue
  • A protocol that numeric BSONValues should conform to. It provides functionality for converting to BSON’s native number types.

    See more

    Declaration

    Swift

    public protocol BSONNumber : BSONValue
  • A protocol indicating write operations that can be batched together using MongoCollection.bulkWrite.

    See more

    Declaration

    Swift

    public protocol WriteModel
  • An empty protocol for encapsulating all errors that this package can throw.

    Declaration

    Swift

    public protocol MongoError : LocalizedError