fn restrict_range_to_predicted(&self, range: Range<PageIndex>) -> Range<PageIndex> {
        let range = range_intersection(&range, &self.page_range());

        let start = range.start.get() as usize;
        let old_end = range.end.get() as usize;

        let mut predicted_count = 1;
        while predicted_count < start && start + predicted_count < old_end {
            if !self.pages.get(start - predicted_count).unwrap_or(false) {
                break;
            }
            predicted_count += 1;
        }

        Range {
            start: PageIndex::new(start as u64),
            end: PageIndex::new((start + predicted_count) as u64),
        }
    }
// Returns the range of pages that are predicted to be marked in the future
// based on the marked pages before the start of the given range.
Returns the range of pages that are predicted to be marked in the future
based on the marked pages before the start of the given range.
Returns the range of pages that are predicted to be marked in the future based on the marked pages before the start of the given range .
fn restrict_range_to_predicted(&self, range: Range<PageIndex>) -> Range<PageIndex> {
        let range = range_intersection(&range, &self.page_range());
        let start = range.start.get() as usize;
        let old_end = range.end.get() as usize;
        let mut predicted_count = 1;
        while predicted_count < start && start + predicted_count < old_end {
            if !self.pages.get(start - predicted_count).unwrap_or(false) {
                break;
            }
            predicted_count += 1;
        }
        Range {
            start: PageIndex::new(start as u64),
            end: PageIndex::new((start + predicted_count) as u64),
        }
    }
fn restrict_range_to_predicted ( & self , range : Range < PageIndex > ) -> Range < PageIndex > { let range = range_intersection ( & range , & self . page_range ( ) ) ; let start = range . start . get ( ) as usize ; let old_end = range . end . get ( ) as usize ; let mut predicted_count = 1 ; while predicted_count < start && start + predicted_count < old_end { if ! self . pages . get ( start - predicted_count ) . unwrap_or ( false ) { break ; } predicted_count += 1 ; } Range { start : PageIndex :: new ( start as u64 ) , end : PageIndex :: new ( ( start + predicted_count ) as u64 ) , } }
Returns the range of pages that are predicted to be marked in the future
based on the marked pages before the start of the given range.
Returns the range of pages that are predicted to be marked in the future based on the marked pages before the start of the given range .
&self
range
Range<PageIndex>
&self
range
Range<PageIndex>