pub struct Sessions<'a> { /* private fields */ }Expand description
Browser-session management. Saved sessions can be replayed via the /v1/browser-connect CDP endpoint to skip re-login flows.
Implementations§
Source§impl<'a> Sessions<'a>
impl<'a> Sessions<'a>
Sourcepub async fn list(&self) -> Result<Vec<BrowserSession>>
pub async fn list(&self) -> Result<Vec<BrowserSession>>
List all saved sessions for the API key.
Sourcepub async fn create(
&self,
name: &str,
description: Option<&str>,
) -> Result<BrowserSession>
pub async fn create( &self, name: &str, description: Option<&str>, ) -> Result<BrowserSession>
Create an empty named session.
Sourcepub async fn save(
&self,
session_id: &str,
name: Option<&str>,
description: Option<&str>,
) -> Result<BrowserSession>
pub async fn save( &self, session_id: &str, name: Option<&str>, description: Option<&str>, ) -> Result<BrowserSession>
Save the current state of a CDP session by ID.
Auto Trait Implementations§
impl<'a> Freeze for Sessions<'a>
impl<'a> !RefUnwindSafe for Sessions<'a>
impl<'a> Send for Sessions<'a>
impl<'a> Sync for Sessions<'a>
impl<'a> Unpin for Sessions<'a>
impl<'a> UnsafeUnpin for Sessions<'a>
impl<'a> !UnwindSafe for Sessions<'a>
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