subscript(_:)

Appends the given key-value pair to this document builder, encoding the value as the field value using its BSONEncodable implementation.

BSON.DocumentEncoder.swift:53
subscript<Value>(key: CodingKey) -> Value? where Value : BSONEncodable { get set }

Type inference will always prefer one of the concretely-typed subscript overloads over this one.

The getter always returns nil.

Every non-nil assignment to this subscript (including mutations that leave the value in a non-nil state after returning) will add a new field to the document, even if the key is the same.