Struct axum_odbc::ODBCConnectionManager
source · pub struct ODBCConnectionManager { /* private fields */ }
Implementations§
source§impl ODBCConnectionManager
impl ODBCConnectionManager
sourcepub fn new<S: Into<String>>(
connection_string: S,
limit: u32
) -> ODBCConnectionManager
pub fn new<S: Into<String>>( connection_string: S, limit: u32 ) -> ODBCConnectionManager
Constructs a ODBCConnectionManager.
limit is the max size of how many connections we will allow to exist within the pool. All other connections will get dropped after use if the pool is full.
Examples
use axum_odbc::{OdbcManagerLayer, ODBCConnectionManager};
let odbc_manager = ODBCConnectionManager::new("DSN=PostgreSQL", 5);
Trait Implementations§
source§impl Clone for ODBCConnectionManager
impl Clone for ODBCConnectionManager
source§fn clone(&self) -> ODBCConnectionManager
fn clone(&self) -> ODBCConnectionManager
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ODBCConnectionManager
impl Debug for ODBCConnectionManager
source§impl<S> FromRequestParts<S> for ODBCConnectionManagerwhere
S: Send + Sync,
ODBCConnectionManager: FromRef<S>,
impl<S> FromRequestParts<S> for ODBCConnectionManagerwhere S: Send + Sync, ODBCConnectionManager: FromRef<S>,
§type Rejection = Infallible
type Rejection = Infallible
If the extractor fails it’ll use this “rejection” type. A rejection is
a kind of error that can be converted into a response.
Auto Trait Implementations§
impl RefUnwindSafe for ODBCConnectionManager
impl Send for ODBCConnectionManager
impl Sync for ODBCConnectionManager
impl Unpin for ODBCConnectionManager
impl UnwindSafe for ODBCConnectionManager
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<S, T> FromRequest<S, ViaParts> for Twhere
S: Send + Sync,
T: FromRequestParts<S>,
impl<S, T> FromRequest<S, ViaParts> for Twhere S: Send + Sync, T: FromRequestParts<S>,
§type Rejection = <T as FromRequestParts<S>>::Rejection
type Rejection = <T as FromRequestParts<S>>::Rejection
If the extractor fails it’ll use this “rejection” type. A rejection is
a kind of error that can be converted into a response.