Expand description
Rocket integration module.
Provides pre-built handlers and helpers for Rocket 0.5.x.
§Quick Start
ⓘ
use html2pdf_api::prelude::*;
use html2pdf_api::integrations::rocket::routes;
#[rocket::launch]
async fn launch() -> _ {
let pool = init_browser_pool().await.unwrap();
rocket::build()
.manage(pool)
.mount("/", routes())
}§Available Exports
| Export | Description |
|---|---|
routes | Get all pre-built routes |
pdf_from_url | Handler for URL-to-PDF |
pdf_from_html | Handler for HTML-to-PDF |
pool_stats | Handler for pool statistics |
health_check | Handler for health check |
readiness_check | Handler for readiness check |
SharedPool | Type alias for Arc<Mutex<BrowserPool>> |
See crate::integrations::rocket for full documentation.
Re-exports§
pub use crate::integrations::rocket::*;