[][src]Trait avocado::doc::Doc

pub trait Doc: Serialize + for<'a> Deserialize<'a> {
    type Id: Eq + Serialize + for<'a> Deserialize<'a>;

    const NAME: &'static str;
    fn indexes() -> Vec<IndexModel> { ... }
fn count_options() -> CountOptions { ... }
fn distinct_options() -> DistinctOptions { ... }
fn aggregate_options() -> AggregateOptions { ... }
fn query_options() -> FindOptions { ... }
fn insert_options() -> InsertManyOptions { ... }
fn delete_options() -> WriteConcern { ... }
fn update_options() -> WriteConcern { ... }
fn upsert_options() -> WriteConcern { ... } }

Implemented by top-level (direct collection member) documents only. These types always have an associated top-level name and an _id field.

Associated Types

The type of the unique IDs for the document. A good default choice is ObjectId. TODO(H2CO3): make it default to ObjectId (#29661).

Loading content...

Associated Constants

The name of the collection within the database.

Loading content...

Provided methods

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.)

Options for a count-only query.

Options for a distinct query.

Aggregation pipeline options.

Options for a regular query.

Options for single and batch insertions.

Options for a delete operation.

Options for a (strictly non-upsert) update operation.

Options for upserting.

Loading content...

Implementors

Loading content...