Module error

Module error 

Source
Expand description

Error types for the browser pool.

This module provides BrowserPoolError, a unified error type for all browser pool operations, and a convenient Result type alias.

§Example

use html2pdf_api::{BrowserPoolError, Result};

fn process_pdf() -> Result<Vec<u8>> {
    // Your logic here...
    Err(BrowserPoolError::Configuration("example error".to_string()))
}

match process_pdf() {
    Ok(pdf) => println!("Generated {} bytes", pdf.len()),
    Err(BrowserPoolError::ShuttingDown) => println!("Pool is shutting down"),
    Err(e) => eprintln!("Error: {}", e),
}

Enums§

BrowserPoolError
Errors that can occur during browser pool operations.

Type Aliases§

Result
Result type alias using BrowserPoolError.