pub trait Cursor: Sized {
Show 13 methods
// Required methods
fn keys() -> Vec<&'static str>;
fn bind<'q, O>(
self,
query: QueryAs<'_, Postgres, O, PgArguments>
) -> QueryAs<'_, Postgres, O, PgArguments>
where O: for<'r> FromRow<'r, <Postgres as Database>::Row> + 'q + Send + Unpin + Cursor;
fn serialize(&self) -> Vec<String>;
fn deserialize(values: Vec<&str>) -> Result<Self, CursorError>;
// Provided methods
fn serialize_utc(value: DateTime<Utc>) -> String { ... }
fn deserialize_as<F: Into<String>, D: FromStr>(
field: F,
value: Option<&&str>
) -> Result<D, CursorError> { ... }
fn deserialize_as_utc<F: Into<String>>(
field: F,
value: Option<&&str>
) -> Result<DateTime<Utc>, CursorError> { ... }
fn to_cursor(&self) -> String { ... }
fn from_cursor<C: Into<String>>(cursor: C) -> Result<Self, CursorError> { ... }
fn to_pg_filter(backward: bool) -> String { ... }
fn to_pg_filter_with_pos(backward: bool, pos: usize) -> String { ... }
fn to_pg_filter_opts(
backward: bool,
keys: Option<Vec<&str>>,
pos: Option<usize>
) -> String { ... }
fn to_pg_order(backward: bool) -> String { ... }
}