pub struct SmartBrowse<'a> { /* private fields */ }Expand description
The SmartBrowse method namespace, obtained via Client::smartbrowse.
Implementations§
Source§impl SmartBrowse<'_>
impl SmartBrowse<'_>
Sourcepub async fn run(
&self,
recipe_id: &str,
) -> Result<Response<SmartBrowseDispatch>>
pub async fn run( &self, recipe_id: &str, ) -> Result<Response<SmartBrowseDispatch>>
Dispatch a recipe replay run (async). Returns immediately with a run id to poll. Costs 2 credits per page, billed on completion.
Sourcepub async fn get_run(&self, run_id: &str) -> Result<Response<SmartBrowseRun>>
pub async fn get_run(&self, run_id: &str) -> Result<Response<SmartBrowseRun>>
Poll a run’s current state (free).
Sourcepub async fn usage(&self) -> Result<Response<SmartBrowseUsage>>
pub async fn usage(&self) -> Result<Response<SmartBrowseUsage>>
Plan caps + rolling-30-day usage (free).
Sourcepub async fn wait_for_run(
&self,
run_id: &str,
opts: WaitOptions,
) -> Result<Response<SmartBrowseRun>>
pub async fn wait_for_run( &self, run_id: &str, opts: WaitOptions, ) -> Result<Response<SmartBrowseRun>>
Poll run_id until it reaches a terminal state.
completed→ returns the run response.failed/cancelled→Error::RunFailedcarrying the run.- deadline exceeded →
Error::WaitTimeoutcarrying the last-seen run.
Sourcepub async fn run_and_wait(
&self,
recipe_id: &str,
opts: WaitOptions,
) -> Result<Response<SmartBrowseRun>>
pub async fn run_and_wait( &self, recipe_id: &str, opts: WaitOptions, ) -> Result<Response<SmartBrowseRun>>
run followed by wait_for_run.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for SmartBrowse<'a>
impl<'a> !UnwindSafe for SmartBrowse<'a>
impl<'a> Freeze for SmartBrowse<'a>
impl<'a> Send for SmartBrowse<'a>
impl<'a> Sync for SmartBrowse<'a>
impl<'a> Unpin for SmartBrowse<'a>
impl<'a> UnsafeUnpin for SmartBrowse<'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