Trait graphql_starter::pagination::IntoCursorVec

source ·
pub trait IntoCursorVec<T> {
    // Required method
    fn with_cursor<F, Z>(self, cursor_generator: F) -> Result<Vec<Edge<T>>>
       where F: Fn(&T) -> Z + 'static,
             Z: Serialize + DeserializeOwned;
}
Expand description

Trait to convert iterators into edges

Required Methods§

source

fn with_cursor<F, Z>(self, cursor_generator: F) -> Result<Vec<Edge<T>>>
where F: Fn(&T) -> Z + 'static, Z: Serialize + DeserializeOwned,

Maps this iterator to include the opaque cursor with each item

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T, Y> IntoCursorVec<T> for Y
where Y: IntoIterator<Item = T> + 'static,