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§
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
Object Safety§
This trait is not object safe.