pub trait Countable: Sized {
// Provided method
fn with_total(self) -> WithTotal<Self> { ... }
}Available on crate feature
utils only.Expand description
Trait that adds total-count support to query builders.
Automatically implemented for all types that implement Query.
Provided Methods§
Sourcefn with_total(self) -> WithTotal<Self>
fn with_total(self) -> WithTotal<Self>
Wrap this builder in WithTotal<Self>. When Query::query() is called,
an additional COUNT(*) query is executed and the result is placed in
the total field of the returned Totalled.
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.