Struct nickel_sqlite::SqliteMiddleware
[−]
[src]
pub struct SqliteMiddleware { pub pool: Pool<SqliteConnectionManager>, }
Fields
pool: Pool<SqliteConnectionManager>
Methods
impl SqliteMiddleware
[src]
fn new(db_url: &str) -> Result<SqliteMiddleware, Box<Error>>
[src]
Create middleware using defaults
The middleware will be setup with the r2d2 defaults.
fn with_pool(pool: Pool<SqliteConnectionManager>) -> SqliteMiddleware
[src]
Create middleware using pre-built r2d2::Pool
This allows the caller to create and configure the pool with specific settings.
Trait Implementations
impl Key for SqliteMiddleware
[src]
type Value = Pool<SqliteConnectionManager>
The value type associated with this key type.
impl<D> Middleware<D> for SqliteMiddleware
[src]
fn invoke<'a>(
&self,
req: &mut Request<D>,
res: Response<'a, D>
) -> MiddlewareResult<'a, D>
[src]
&self,
req: &mut Request<D>,
res: Response<'a, D>
) -> MiddlewareResult<'a, D>