1 2 3 4 5 6 7 8 9 10 11 12 13 14
#[cfg(test)] use std::ops::Range; pub struct ResourceProviderListParams { pub limit: usize, pub offset: usize, } impl ResourceProviderListParams { #[cfg(test)] pub fn range(&self) -> Range<usize> { self.offset..(self.offset + self.limit) } }