pub trait IntoRowCount {
// Required method
fn into_row_count(self) -> RowCount;
}Expand description
A number of rows — what a LIMIT and an OFFSET each are: an integer,
or a prepare!{} placeholder for one, so a paginated endpoint can
prepare its query once and vary the page. A trait rather than
Into<i64> so a usize page size — the shape a paginated handler
already has — goes in without a cast. Every numeric impl lands in
0..=i64::MAX: a negative count is not a query any database will run,
and a usize past i64::MAX is not a page anyone is asking for.
Required Methods§
fn into_row_count(self) -> RowCount
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".