Skip to main content

GrabBackend

Trait GrabBackend 

Source
pub trait GrabBackend: Send + Sync {
    // Required methods
    fn client(&self, session: Arc<dyn SessionSlot>) -> Arc<dyn GrabClient> ⓘ;
    fn login(
        &self,
        cdp_url: &str,
        previous: Option<Value>,
    ) -> Result<Box<dyn LoginDriver>, String>;
}
Expand description

Makes the clients and the login drivers.

Required Methods§

Source

fn client(&self, session: Arc<dyn SessionSlot>) -> Arc<dyn GrabClient> ⓘ

The client of the account behind session.

Source

fn login( &self, cdp_url: &str, previous: Option<Value>, ) -> Result<Box<dyn LoginDriver>, String>

A login driver on the browser at cdp_url; previous is the account’s session if it has one (its delivery address carries over).

§Errors

The browser can’t be reached.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§