Trait PagedEndpointExt

Source
pub trait PagedEndpointExt<'a, E> {
    // Required methods
    fn iter<T, C>(&'a self, client: &'a C) -> PagedIter<'a, E, C, T> 
       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§

Source

fn iter<T, C>(&'a self, client: &'a C) -> PagedIter<'a, E, C, T>
where C: Client, T: DeserializeOwned,

Create an Iterator over the results of the paginated endpoint.

Source

fn single_page(&'a self) -> SinglePageBuilder<'a, E>

Retrieves a single page of results for the paginated endpoint.

Source

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,

Create an async Stream over the results of the paginated endpoint.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, E> PagedEndpointExt<'a, E> for E
where E: Endpoint + Pageable,