pub struct RunCollectionClient { /* private fields */ }Expand description
Client for listing Actor runs.
Implementations§
Source§impl RunCollectionClient
impl RunCollectionClient
Sourcepub async fn list(
&self,
options: ListOptions,
filter: RunListOptions,
) -> ApifyClientResult<PaginationList<ActorRun>>
pub async fn list( &self, options: ListOptions, filter: RunListOptions, ) -> ApifyClientResult<PaginationList<ActorRun>>
Lists runs with offset/limit pagination and optional status/started-time filtering.
Unlike other collections, run listing takes two arguments: the shared ListOptions
(offset/limit/desc) and a RunListOptions filter (status and start-time bounds).
§Example
use apify_client::{ApifyClient, ListOptions, RunListOptions};
let client = ApifyClient::new("my-api-token");
let runs = client
.runs()
.list(
ListOptions { limit: Some(10), desc: Some(true), ..Default::default() },
RunListOptions { status: vec!["SUCCEEDED".to_string()], ..Default::default() },
)
.await?;
for run in runs.items {
println!("{}", run.id);
}Sourcepub fn iterate(
&self,
options: ListOptions,
filter: RunListOptions,
) -> ListIterator<ActorRun>
pub fn iterate( &self, options: ListOptions, filter: RunListOptions, ) -> ListIterator<ActorRun>
Lazily iterates over all runs matching options/filter, fetching pages on demand.
The idiomatic-Rust counterpart of the reference client’s async-iterable run listing;
yields one ActorRun at a time across all pages.
options.limit caps the total number of runs yielded across all pages, unlike
list where limit is a single page’s size. Set the per-page fetch size
with with_chunk_size; see
ListIterator for details.
Trait Implementations§
Source§impl Clone for RunCollectionClient
impl Clone for RunCollectionClient
Source§fn clone(&self) -> RunCollectionClient
fn clone(&self) -> RunCollectionClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for RunCollectionClient
impl !UnwindSafe for RunCollectionClient
impl Freeze for RunCollectionClient
impl Send for RunCollectionClient
impl Sync for RunCollectionClient
impl Unpin for RunCollectionClient
impl UnsafeUnpin for RunCollectionClient
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