Expand description
§Nongoose
Nongoose is an Object Data Mapping (ODM) for MongoDB based on Mongoose.
§Installation
§Requeriments
- Rust 1.48+
- MongoDB 3.6+
## Importing
The library is available on crates.io. To use it in
your application, simply add it to your project’s Cargo.toml
.
[dependencies]
nongoose = "0.1.0-beta.1"
§All feature flags
Feature | Description | Extra dependencies | Default |
---|---|---|---|
derive | Enable support for the macro derives | nongoose-derive | yes |
sync | Expose the synchronous API. This flag cannot be used in conjuntion with either of the async runtime feature flags | n/a | no |
tokio-runtime | Enable support for the tokio async runtime | tokio 1.0 with the macros feature and async-trait | yes |
Re-exports§
pub use mongodb::bson;
Modules§
Structs§
- Client
- This is the main entry point for the synchronous API. A
Client
is used to connect to a MongoDB cluster. By default, it will monitor the topology of the cluster, keeping track of any changes, such as servers being added or removed. - Database
Database
is the client-side abstraction of a MongoDB database. It can be used to perform database-level operations or to obtain handles to specific collections within the database. ADatabase
can only be obtained through aClient
by calling eitherClient::database
orClient::database_with_options
.- Nongoose
- Nongoose instance
- Nongoose
Builder - Specifies the options to a Nongoose instance.
Enums§
- Error
- An error that can occur in the
nongoose
crate.
Traits§
- Schema
- Schema
- Schema
Before - Schema before functions
Type Aliases§
- Result
- The result type for all methods that can return an error in the
nongoose
crate.