[][src]Trait egg_mode::cursor::Cursor

pub trait Cursor {
    type Item;
    fn previous_cursor_id(&self) -> i64;
fn next_cursor_id(&self) -> i64;
fn into_inner(self) -> Vec<Self::Item>; }

Trait to generalize over paginated views of API results.

Types that implement Cursor are used as intermediate steps in CursorIter's Stream implementation, to properly load the data from Twitter. Most of the time you don't need to deal with Cursor structs directly, but you can get them via CursorIter's manual paging functionality.

Associated Types

type Item

What type is being returned by the API call?

Loading content...

Required methods

fn previous_cursor_id(&self) -> i64

Returns a numeric reference to the previous page of results.

fn next_cursor_id(&self) -> i64

Returns a numeric reference to the next page of results.

fn into_inner(self) -> Vec<Self::Item>

Unwraps the cursor, returning the collection of results from inside.

Loading content...

Implementors

impl Cursor for IDCursor[src]

type Item = u64

impl Cursor for ListCursor[src]

type Item = List

impl Cursor for UserCursor[src]

type Item = TwitterUser

Loading content...