Expand description
crud/crud.md §§ Read/Write Operations, Write Models and Results.
Builders retain capacity. Inputs and options are borrowed raw BSON; IDs and
wall-clock ObjectId timestamps are supplied by the host (no ObjectId::new()).
Inserted documents need an _id before sending; see ObjectIdGenerator and
the crate’s host entropy obligations.
Structs§
- Bulk
Batch - Bulk
Batcher - Splits a write sequence against all three negotiated size limits without copying documents. Accumulate results with BulkResult and this batch’s offset.
- Bulk
Result - Aggregates split batches with original indices preserved. Allocation is solely owned result/error representation; success counters do not allocate.
- Command
- Cursor
- Cursor
Batch - No per-row allocation: documents borrow the raw response buffer.
- Object
IdGenerator - ObjectId generator with host-supplied process entropy and wall-clock seconds. BSON ObjectId specification § Generation: 4 timestamp, 5 random, 3 counter bytes.
- Write
Model - A write sequence entry (updateOne/updateMany/replaceOne, deleteOne/deleteMany).
- Write
Result - Counts and error detail of an insert/update/delete reply.