[][src]Trait async_graphql::connection::CursorType

pub trait CursorType: Sized {
    type Error: Display;
    fn decode_cursor(s: &str) -> Result<Self, Self::Error>;
fn encode_cursor(&self) -> Result<String, Self::Error>; }

Cursor type

A custom scalar that serializes as a string. https://relay.dev/graphql/connections.htm#sec-Cursor

Associated Types

type Error: Display

Error type for encode_cursor and decode_cursor.

Loading content...

Required methods

fn decode_cursor(s: &str) -> Result<Self, Self::Error>

Decode cursor from string.

fn encode_cursor(&self) -> Result<String, Self::Error>

Encode cursor to string.

Loading content...

Implementations on Foreign Types

impl CursorType for usize[src]

type Error = Error

impl CursorType for String[src]

type Error = Infallible

Loading content...

Implementors

impl CursorType for ID[src]

type Error = Infallible

Loading content...