pub type BrowserPoolData = Data<SharedBrowserPool>;Expand description
Type alias for Actix-web Data wrapper around the shared pool.
Use this type in your handler parameters for automatic extraction:
ⓘ
use html2pdf_api::integrations::actix::BrowserPoolData;
async fn handler(pool: BrowserPoolData) -> impl Responder {
let pool_guard = pool.lock().unwrap();
let browser = pool_guard.get()?;
// ...
}§Note
BrowserPoolData and web::Data<SharedPool> are interchangeable.
Use whichever is more convenient for your code.
Aliased Type§
pub struct BrowserPoolData(/* private fields */);