1 2 3 4 5 6 7 8 9 10 11 12 13 14
#[derive(Clone)] pub enum Paging { Not, By(usize), } impl Paging { pub fn size_with(&self, scrap_count: usize) -> usize { match self { Paging::Not => scrap_count, Paging::By(size) => size.to_owned(), } } }