Skip to main content

Countable

Trait Countable 

Source
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§

Source

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.

Implementors§

Source§

impl<T: Query> Countable for T