[−][src]Trait avocado::doc::Doc
Implemented by top-level (direct collection member) documents only.
These types always have an associated top-level name and an _id
field.
Associated Types
type Id: Eq + Serialize + for<'a> Deserialize<'a>
The type of the unique IDs for the document. A good default choice
is ObjectId
. TODO(H2CO3): make it default to ObjectId
(#29661).
Associated Constants
Loading content...Provided methods
fn indexes() -> Vec<IndexModel>
Returns the specifications of the indexes created on the collection.
If not provided, returns an empty vector, leading to the collection not
bearing any user-defined indexes. (The _id
field will still be
indexed, though, as defined by MongoDB.)
fn count_options() -> CountOptions
Options for a count-only query.
fn distinct_options() -> DistinctOptions
Options for a distinct
query.
fn aggregate_options() -> AggregateOptions
Aggregation pipeline options.
fn query_options() -> FindOptions
Options for a regular query.
fn insert_options() -> InsertManyOptions
Options for single and batch insertions.
fn delete_options() -> WriteConcern
Options for a delete operation.
fn update_options() -> WriteConcern
Options for a (strictly non-upsert) update operation.
fn upsert_options() -> WriteConcern
Options for upserting.