You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What exactly is r2d2_foodb::FooConnectionManager in the example and is there a source code of it somewhere? I tried using something like this:
let config = r2d2::Config::default();
let manager = r2d2::ConnectionManager::new("postgres://postgres:postgres@localhost/test");
let error_handler = Box::new(r2d2::LoggingErrorHandler);
let pool = Arc::new(r2d2::Pool::new(config, manager, error_handler).unwrap());
but it throws an error
src/main.rs:125:16: 125:44 error: the value of the associated type `Error` (from the trait `r2d2::ConnectionManager`) must be specified [E0191]
src/main.rs:125 let manager = r2d2::ConnectionManager::new(DB_URI);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/main.rs:125:16: 125:44 error: the value of the associated type `Connection` (from the trait `r2d2::ConnectionManager`) must be specified [E0191]
src/main.rs:125 let manager = r2d2::ConnectionManager::new(DB_URI);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/main.rs:125:16: 125:44 error: no associated item named `new` found for type `r2d2::ConnectionManager` in the current scope
src/main.rs:125 let manager = r2d2::ConnectionManager::new(DB_URI);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to 3 previous errors
The text was updated successfully, but these errors were encountered:
What exactly is
r2d2_foodb::FooConnectionManager
in the example and is there a source code of it somewhere? I tried using something like this:but it throws an error
The text was updated successfully, but these errors were encountered: