Struct nickel_diesel::DieselMiddleware
[−]
[src]
pub struct DieselMiddleware<T> where
T: Connection + Send + Any, { pub pool: Arc<Pool<ConnectionManager<T>>>, }
Fields
pool: Arc<Pool<ConnectionManager<T>>>
Methods
impl<T> DieselMiddleware<T> where
T: Connection + Send + Any,
[src]
T: Connection + Send + Any,
fn new(
connect_str: &str,
num_connections: u32,
error_handler: Box<HandleError<Error>>
) -> Result<DieselMiddleware<T>, Box<StdError>>
[src]
connect_str: &str,
num_connections: u32,
error_handler: Box<HandleError<Error>>
) -> Result<DieselMiddleware<T>, Box<StdError>>
fn from_pool(pool: Pool<ConnectionManager<T>>) -> DieselMiddleware<T>
[src]
Trait Implementations
impl<T> Key for DieselMiddleware<T> where
T: Connection + Send + Any,
[src]
T: Connection + Send + Any,
type Value = Arc<Pool<ConnectionManager<T>>>
The value type associated with this key type.
impl<T, D> Middleware<D> for DieselMiddleware<T> where
T: Connection + Send + Any,
[src]
T: Connection + Send + Any,
fn invoke<'mw, 'conn>(
&self,
req: &mut Request<'mw, 'conn, D>,
res: Response<'mw, D>
) -> MiddlewareResult<'mw, D>
[src]
&self,
req: &mut Request<'mw, 'conn, D>,
res: Response<'mw, D>
) -> MiddlewareResult<'mw, D>