BrowserPoolState

Type Alias BrowserPoolState 

Source
pub type BrowserPoolState = State<SharedBrowserPool>;
Expand description

Type alias for Axum State extractor with the shared pool.

Use this type in your handler parameters:

async fn handler(
    BrowserPoolState(pool): BrowserPoolState,
) -> impl IntoResponse {
    let pool = pool.lock().unwrap();
    let browser = pool.get()?;
    // ...
}

Aliased Type§

pub struct BrowserPoolState(pub Arc<Mutex<BrowserPool>>);

Tuple Fields§

§0: Arc<Mutex<BrowserPool>>