kandi X-RAY | r2d2-mongodb Summary
kandi X-RAY | r2d2-mongodb Summary
r2d2-mongodb
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of r2d2-mongodb
r2d2-mongodb Key Features
r2d2-mongodb Examples and Code Snippets
Community Discussions
Trending Discussions on r2d2-mongodb
QUESTION
I am new to Rust and was trying to create a webserver with Actix-web to perform CRUD operations via MongoDB. The first API I am creating is to save a simple document in MongoDB by something received from a POST request. The code for the post request handler function is:
...ANSWER
Answered 2020-Dec-20 at 14:38The r2d2-mongodb
is outdated and no longer supported, the r2d2
crate marks it as:
deprecated: official driver handles pooling internally
So I recommend you don't use it. You should be able to use a mongodb::Client
or mongodb::Database
instead of a Pool
.
The reason for the error is the r2d2-mongodb
uses an older version of mongodb
(0.3) and therefore an older version of bson
(0.13) that is incompatible with the version of bson
you're using (1.1.0). You'll probably have similar compatibility issues with the mongodb
crate itself as well. You can fix it by lowering your dependencies:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install r2d2-mongodb
Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page