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§
Required Methods§
sourcefn decode_cursor(s: &str) -> Result<Self, Self::Error>
fn decode_cursor(s: &str) -> Result<Self, Self::Error>
Decode cursor from string.
sourcefn encode_cursor(&self) -> String
fn encode_cursor(&self) -> String
Encode cursor to string.
Object Safety§
This trait is not object safe.