#[cfg(feature = "std")]
pub mod compact;
#[cfg(feature = "std")]
pub mod iterable;
#[cfg(feature = "std")]
pub mod peekable;
pub trait Dimension {
fn get_width(&self, column: usize) -> usize;
fn get_height(&self, row: usize) -> usize;
}
impl<T> Dimension for &T
where
T: Dimension,
{
fn get_height(&self, row: usize) -> usize {
T::get_height(self, row)
}
fn get_width(&self, column: usize) -> usize {
T::get_width(self, column)
}
}
pub trait Estimate<R, C> {
fn estimate(&mut self, records: R, config: &C);
}
impl<T, R, C> Estimate<R, C> for &mut T
where
T: Estimate<R, C>,
{
fn estimate(&mut self, records: R, config: &C) {
T::estimate(self, records, config)
}
}