pub struct BrowserbaseBackend { /* private fields */ }Expand description
Cloud browser session against Browserbase, reused across fetches.
Implementations§
Source§impl BrowserbaseBackend
impl BrowserbaseBackend
Sourcepub async fn connect(cfg: BrowserbaseConfig) -> Result<Self>
pub async fn connect(cfg: BrowserbaseConfig) -> Result<Self>
Create a session via the Browserbase REST API and attach a raw
CdpClient to the CDP WebSocket it returns.
§Errors
Error::BrowserSetup on REST / authentication / WebSocket /
TLS / CDP-handshake failure.
Sourcepub fn session_id(&self) -> &str
pub fn session_id(&self) -> &str
The Browserbase session id, useful in logs / billing correlation.
Trait Implementations§
Source§impl BrowserBackend for BrowserbaseBackend
impl BrowserBackend for BrowserbaseBackend
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 moreAuto Trait Implementations§
impl !Freeze for BrowserbaseBackend
impl !RefUnwindSafe for BrowserbaseBackend
impl Send for BrowserbaseBackend
impl Sync for BrowserbaseBackend
impl Unpin for BrowserbaseBackend
impl UnsafeUnpin for BrowserbaseBackend
impl !UnwindSafe for BrowserbaseBackend
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