BrowserBackend

Trait BrowserBackend 

Source
pub trait BrowserBackend: Send + Sync {
    // Required methods
    async fn render(
        &self,
        url: &Url,
        options: &RenderOptions,
    ) -> Result<BrowserResponse>;
    async fn health_check(&self) -> Result<()>;
    async fn close(&self) -> Result<()>;
}
Expand description

Browser backend trait for abstraction

Required Methods§

Source

async fn render( &self, url: &Url, options: &RenderOptions, ) -> Result<BrowserResponse>

Render a URL and return the result

Source

async fn health_check(&self) -> Result<()>

Check if the browser is healthy

Source

async fn close(&self) -> Result<()>

Close the browser

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§