Trait speedrun_api::api::PagedEndpointExt
source · [−]pub trait PagedEndpointExt<'a, E> {
fn iter<T, C>(&'a self, client: &'a C) -> PagedIter<'a, E, C, T>ⓘNotable traits for PagedIter<'a, E, C, T>impl<'a, E, C, T> Iterator for PagedIter<'a, E, C, T>where
E: Endpoint + Pageable,
T: DeserializeOwned,
C: Client, type Item = Result<T, ApiError<C::Error>>;
where
C: Client,
T: DeserializeOwned;
fn single_page(&'a self) -> SinglePageBuilder<'a, E>;
fn stream<T, C>(
&'a self,
client: &'a C
) -> BoxStream<'a, Result<T, ApiError<C::Error>>>
where
T: DeserializeOwned + Send + 'static,
C: AsyncClient + Sync,
E: Sync + Send;
}Expand description
Adapters specific to Pageable endpoints.
Required Methods
sourcefn iter<T, C>(&'a self, client: &'a C) -> PagedIter<'a, E, C, T>ⓘNotable traits for PagedIter<'a, E, C, T>impl<'a, E, C, T> Iterator for PagedIter<'a, E, C, T>where
E: Endpoint + Pageable,
T: DeserializeOwned,
C: Client, type Item = Result<T, ApiError<C::Error>>;where
C: Client,
T: DeserializeOwned,
fn iter<T, C>(&'a self, client: &'a C) -> PagedIter<'a, E, C, T>ⓘNotable traits for PagedIter<'a, E, C, T>impl<'a, E, C, T> Iterator for PagedIter<'a, E, C, T>where
E: Endpoint + Pageable,
T: DeserializeOwned,
C: Client, type Item = Result<T, ApiError<C::Error>>;where
C: Client,
T: DeserializeOwned,
E: Endpoint + Pageable,
T: DeserializeOwned,
C: Client, type Item = Result<T, ApiError<C::Error>>;
Create an Iterator over the results of the paginated endpoint.
sourcefn single_page(&'a self) -> SinglePageBuilder<'a, E>
fn single_page(&'a self) -> SinglePageBuilder<'a, E>
Retrieves a single page of results for the paginated endpoint.