Skip to main content

PagedResponse

Trait PagedResponse 

Source
pub trait PagedResponse: Send + 'static {
    type Item: Send + 'static;
    type Cursor: Clone + Send + 'static;

    // Required methods
    fn items_mut(&mut self) -> &mut Vec<Self::Item>;
    fn items(&self) -> &[Self::Item];
    fn next_cursor(&self) -> Option<Self::Cursor>;
    fn absorb(&mut self, later: Self);
}
Expand description

A response that carries items and a continuation position.

Required Associated Types§

Source

type Item: Send + 'static

One item in the response.

Source

type Cursor: Clone + Send + 'static

The position passed to the next request.

Required Methods§

Source

fn items_mut(&mut self) -> &mut Vec<Self::Item>

Returns the response items for collection or splitting.

Source

fn items(&self) -> &[Self::Item]

Returns the response items.

Source

fn next_cursor(&self) -> Option<Self::Cursor>

Returns the next request position.

Source

fn absorb(&mut self, later: Self)

Appends a later page and adopts its continuation metadata.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§