pub trait ExactRecords {
fn count_rows(&self) -> usize;
}
impl<T> ExactRecords for &T
where
T: ExactRecords,
{
fn count_rows(&self) -> usize {
T::count_rows(self)
}
}
#[cfg(feature = "std")]
impl<T> ExactRecords for Vec<T> {
fn count_rows(&self) -> usize {
self.len()
}
}
impl<T> ExactRecords for [T] {
fn count_rows(&self) -> usize {
self.len()
}
}