Expand description
Traits for abstraction and extensibility.
This module provides traits that define the core abstractions used by the browser pool. These traits enable:
- Health monitoring:
Healthcheckfor verifying browser health - Extensibility: Custom implementations for different use cases
§Implementing Custom Health Checks
While TrackedBrowser implements Healthcheck
by default, you can implement custom health check logic:
ⓘ
use html2pdf_api::{Healthcheck, Result, BrowserPoolError};
struct MyCustomBrowser {
// your fields
}
impl Healthcheck for MyCustomBrowser {
fn ping(&self) -> Result<()> {
// Your custom health check logic
Ok(())
}
}Traits§
- Healthcheck
- Trait for browser-like objects that support health checking.