// See the comments of the corresponding method in `PageAllocator`.
See the comments of the corresponding method in `PageAllocator`.
See the comments of the corresponding method in ` PageAllocator ` .
fn serialize_page_delta<'a, I>(&'a self, page_delta: I) -> PageDeltaSerialization
    where
        I: IntoIterator<Item = (PageIndex, &'a Page<Self::PageInner>)>,
    {
        let pages: Vec<_> = page_delta
            .into_iter()
            .map(|(page_index, page)| MmapPageSerialization {
                page_index,
                file_offset: page.0.offset,
                validation: page.0.validation,
            })
            .collect();
        let mut guard = self.0.lock().unwrap();
        let core = guard.get_or_insert(MmapBasedPageAllocatorCore::new());
        PageDeltaSerialization::Mmap {
            file_len: core.file_len,
            pages,
        }
    }
fn serialize_page_delta < ' a , I > ( & ' a self , page_delta : I ) -> PageDeltaSerialization where I : IntoIterator < Item = ( PageIndex , & ' a Page < Self :: PageInner > ) > , { let pages : Vec < _ > = page_delta . into_iter ( ) . map ( | ( page_index , page ) | MmapPageSerialization { page_index , file_offset : page . 0 . offset , validation : page . 0 . validation , } ) . collect ( ) ; let mut guard = self . 0 . lock ( ) . unwrap ( ) ; let core = guard . get_or_insert ( MmapBasedPageAllocatorCore :: new ( ) ) ; PageDeltaSerialization :: Mmap { file_len : core . file_len , pages , } }
See the comments of the corresponding method in `PageAllocator`.
See the comments of the corresponding method in ` PageAllocator ` .
&'a self
page_delta
I