Trait evento_query::Cursor

source ·
pub trait Cursor: Sized {
    // Required methods
    fn keys() -> Vec<&'static str>;
    fn serialize(&self) -> Vec<String>;
    fn deserialize(values: Vec<&str>) -> Result<Self, QueryError>;

    // Provided methods
    fn serialize_utc(value: DateTime<Utc>) -> String { ... }
    fn deserialize_as<F: Into<String>, D: FromStr>(
        field: F,
        value: Option<&&str>
    ) -> Result<D, QueryError> { ... }
    fn deserialize_as_utc<F: Into<String>>(
        field: F,
        value: Option<&&str>
    ) -> Result<DateTime<Utc>, QueryError> { ... }
    fn to_cursor(&self) -> CursorType { ... }
    fn from_cursor(cursor: &CursorType) -> Result<Self, QueryError> { ... }
    fn to_pg_filter_opts(
        order: &CursorOrder,
        backward: bool,
        keys: Option<Vec<&str>>,
        pos: Option<usize>
    ) -> String { ... }
    fn to_pg_order(order: &CursorOrder, backward: bool) -> String { ... }
}

Required Methods§

source

fn keys() -> Vec<&'static str>

source

fn serialize(&self) -> Vec<String>

source

fn deserialize(values: Vec<&str>) -> Result<Self, QueryError>

Provided Methods§

source

fn serialize_utc(value: DateTime<Utc>) -> String

source

fn deserialize_as<F: Into<String>, D: FromStr>( field: F, value: Option<&&str> ) -> Result<D, QueryError>

source

fn deserialize_as_utc<F: Into<String>>( field: F, value: Option<&&str> ) -> Result<DateTime<Utc>, QueryError>

source

fn to_cursor(&self) -> CursorType

source

fn from_cursor(cursor: &CursorType) -> Result<Self, QueryError>

source

fn to_pg_filter_opts( order: &CursorOrder, backward: bool, keys: Option<Vec<&str>>, pos: Option<usize> ) -> String

source

fn to_pg_order(order: &CursorOrder, backward: bool) -> String

Object Safety§

This trait is not object safe.

Implementors§