pub struct Sessions<'a> { /* private fields */ }Expand description
The sessions namespace. Obtain via Client::sessions.
Implementations§
Source§impl Sessions<'_>
impl Sessions<'_>
Sourcepub async fn create(
&self,
options: CreateSessionOptions,
) -> Result<Session, SolariError>
pub async fn create( &self, options: CreateSessionOptions, ) -> Result<Session, SolariError>
POST /sessions — acquire a browser session.
Sourcepub async fn get(&self, id: &str) -> Result<SessionView, SolariError>
pub async fn get(&self, id: &str) -> Result<SessionView, SolariError>
GET /sessions/:id.
Sourcepub async fn release(&self, id: &str) -> Result<(), SolariError>
pub async fn release(&self, id: &str) -> Result<(), SolariError>
DELETE /sessions/:id — release the session. 404 is tolerated (the
session already ended).
Unlike the TS SDK there is no fire-and-forget variant; this is the
equivalent of releaseAndWait. Spawn it yourself if you don’t want to
await the round-trip.
Sourcepub async fn replay_url(&self, id: &str) -> Result<ReplayUrl, SolariError>
pub async fn replay_url(&self, id: &str) -> Result<ReplayUrl, SolariError>
GET /sessions/:id/replay-url — presigned URL for the session’s replay.
Available ~1-3s after Sessions::release.
Sourcepub async fn download_replay(&self, id: &str) -> Result<Vec<u8>, SolariError>
pub async fn download_replay(&self, id: &str) -> Result<Vec<u8>, SolariError>
Download the session’s replay as NDJSON bytes. May or may not
actually be gzip despite what was uploaded — GCS decompresses
transparently on an ordinary GET, so check content_encoding (now
provider-accurate) before attempting to decompress.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Sessions<'a>
impl<'a> !UnwindSafe for Sessions<'a>
impl<'a> Freeze 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>
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