pub struct LocalBackend { /* private fields */ }Expand description
A headless Chrome instance driven over CDP. Reused across many
fetch calls until dropped.
Implementations§
Source§impl LocalBackend
impl LocalBackend
Sourcepub async fn launch(cfg: LocalConfig) -> Result<Self>
pub async fn launch(cfg: LocalConfig) -> Result<Self>
Launch a fresh headless Chrome process.
§Errors
Returns Error::BrowserSetup if Chrome can’t be located or the
process fails to start.
Trait Implementations§
Source§impl BrowserBackend for LocalBackend
impl BrowserBackend for LocalBackend
Source§fn fetch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
url: &'life1 Url,
headers: &'life2 BTreeMap<String, String>,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<RenderedPage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fetch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
url: &'life1 Url,
headers: &'life2 BTreeMap<String, String>,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<RenderedPage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Render
url and return the final page state. Read moreSource§impl Drop for LocalBackend
impl Drop for LocalBackend
Auto Trait Implementations§
impl Freeze for LocalBackend
impl !RefUnwindSafe for LocalBackend
impl Send for LocalBackend
impl Sync for LocalBackend
impl Unpin for LocalBackend
impl UnsafeUnpin for LocalBackend
impl !UnwindSafe for LocalBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more