Unset
Takes a document and removes the specified fields. Not to be confused with the unset aggregation pipeline stage, which can take a field path directly.
@frozen enum UnsetTakes a document and removes the specified fields. Not to be confused with the unset aggregation pipeline stage, which can take a field path directly.
@frozen enum Unsetimport MongoA single-type module that declares the Mongo namespace.
import MongoBuiltins@frozen struct UpdateEncoderenum Mongocase unsetcase unsetinit(_ output: consuming BSON.Output) static var frame: BSON.DocumentFrame { get }subscript<Replacement>(key: Assignment) -> Replacement? where Replacement : BSONDocumentEncodable { get set } We generally do not use BSONDocumentEncodable to type documents, because there are many document-typed things that do not declare a coding key type. However, in this case, we use BSONDocumentEncodable and not just BSONEncodable because you should only ever be using this with something that has a CodingKey.
subscript(key: Arithmetic, yield: (inout Mongo.UpdateFieldsEncoder<Arithmetic>) -> ()) -> Void { mutating get } subscript(key: ArrayUnion, yield: (inout Mongo.UpdateFieldsEncoder<ArrayUnion>) -> ()) -> Void { mutating get } subscript(key: Assignment, yield: (inout Mongo.UpdateFieldsEncoder<Assignment>) -> ()) -> Void { mutating get } subscript(key: CurrentDate, yield: (inout Mongo.UpdateFieldsEncoder<CurrentDate>) -> ()) -> Void { mutating get } subscript(key: Bit, yield: (inout Mongo.UpdateFieldsEncoder<Bit>) -> ()) -> Void { mutating get } subscript(key: Pop, yield: (inout Mongo.UpdateFieldsEncoder<Pop>) -> ()) -> Void { mutating get } subscript(key: Pull, yield: (inout Mongo.UpdateFieldsEncoder<Pull>) -> ()) -> Void { mutating get } subscript(key: Unset, yield: (inout Mongo.UpdateFieldsEncoder<Unset>) -> ()) -> Void { mutating get } subscript(key: Rename, yield: (inout Mongo.UpdateFieldsEncoder<Rename>) -> ()) -> Void { mutating get } subscript(key: Reduction, yield: (inout Mongo.UpdateFieldsEncoder<Reduction>) -> ()) -> Void { mutating get } consuming func move() -> BSON.Output @frozen enum Arithmetic@frozen enum ArrayUnion@frozen enum Assignment@frozen enum Bit@frozen enum CurrentDate@frozen enum Pop@frozen enum Pull@frozen enum Reduction@frozen enum Renameprotocol BitwiseCopyableprotocol EquatableA type that can be compared for value equality.
protocol Hashable : EquatableA type that can be hashed into a Hasher to produce an integer hash value.
protocol RawRepresentable<RawValue>A type that can be converted to and from an associated raw value.
protocol Sendableinit?(rawValue: String) var hashValue: Int { get }static func != (lhs: Self, rhs: Self) -> Bool Returns a Boolean value indicating whether two values are not equal.
func hash(into hasher: inout Hasher)