Struct axum_odbc::ODBCConnectionManager
source · [−]pub struct ODBCConnectionManager { /* private fields */ }
Implementations
sourceimpl 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
sourceimpl Clone for ODBCConnectionManager
impl Clone for ODBCConnectionManager
sourcefn clone(&self) -> ODBCConnectionManager
fn clone(&self) -> ODBCConnectionManager
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ODBCConnectionManager
impl Debug for ODBCConnectionManager
sourceimpl<B> FromRequest<B> for ODBCConnectionManager where
B: Send,
impl<B> FromRequest<B> for ODBCConnectionManager where
B: Send,
type Rejection = (StatusCode, &'static str)
type Rejection = (StatusCode, &'static str)
If the extractor fails it’ll use this “rejection” type. A rejection is a kind of error that can be converted into a response. Read more
sourcefn from_request<'life0, 'async_trait>(
req: &'life0 mut RequestParts<B>
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Rejection>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn from_request<'life0, 'async_trait>(
req: &'life0 mut RequestParts<B>
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Rejection>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Perform the extraction.
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more