pub trait Bind {
type T: IntoColumnRef + Clone;
type I: IntoIterator<Item = Self::T>;
type V: IntoIterator<Item = Expr>;
type Cursor: Cursor;
// Required methods
fn columns() -> Self::I;
fn values(cursor: <<Self as Bind>::Cursor as Cursor>::T) -> Self::V;
}Expand description
Trait for binding cursor values in paginated queries.
This trait defines how to serialize cursor data for keyset pagination. It specifies which columns are used for ordering and how to extract their values from a cursor.
§Implementation
The trait is implemented for evento_core::Event to enable pagination
over the event table using timestamp, version, and ID columns.
§Associated Types
T- Column reference typeI- Iterator over column referencesV- Iterator over value expressionsCursor- The cursor type that provides pagination data
Required Associated Types§
Sourcetype T: IntoColumnRef + Clone
type T: IntoColumnRef + Clone
Column reference type (e.g., Event enum variant).
Sourcetype I: IntoIterator<Item = Self::T>
type I: IntoIterator<Item = Self::T>
Iterator type for columns.
Sourcetype V: IntoIterator<Item = Expr>
type V: IntoIterator<Item = Expr>
Iterator type for values.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.