Skip to main content

BrowserPoolData

Type Alias BrowserPoolData 

Source
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 browser = pool.get().unwrap();
    // ...
}

§Note

BrowserPoolData and web::Data<SharedPool> are interchangeable. Use whichever is more convenient for your code.

Aliased Type§

pub struct BrowserPoolData(/* private fields */);