Trait async_graphql::types::connection::CursorType

source ·
pub trait CursorType: Sized {
    type Error: Display;

    // Required methods
    fn decode_cursor(s: &str) -> Result<Self, Self::Error>;
    fn encode_cursor(&self) -> String;
}
Expand description

Cursor type

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

Required Associated Types§

source

type Error: Display

Error type for decode_cursor.

Required Methods§

source

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

Decode cursor from string.

source

fn encode_cursor(&self) -> String

Encode cursor to string.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl CursorType for bool

source§

impl CursorType for char

source§

impl CursorType for f32

source§

impl CursorType for f64

source§

impl CursorType for i8

source§

impl CursorType for i16

source§

impl CursorType for i32

source§

impl CursorType for i64

source§

impl CursorType for i128

source§

impl CursorType for isize

source§

impl CursorType for u8

source§

impl CursorType for u16

source§

impl CursorType for u32

source§

impl CursorType for u64

source§

impl CursorType for u128

source§

impl CursorType for usize

source§

impl CursorType for String

source§

impl CursorType for DateTime<Utc>

source§

impl CursorType for Uuid

Implementors§