/// Note: This method changes file offset.
/// `len` as u32 hint entries reside in this prefetch table.
This method changes file offset.
`len` as u32 hint entries reside in this prefetch table.
This method changes file offset . ` len ` as u32 hint entries reside in this prefetch table .
pub fn load_from(
        &mut self,
        r: &mut RafsIoReader,
        offset: u64,
        table_size: usize,
    ) -> Result<()> {
        // Map prefetch table in.
        // TODO: Need to consider about backend switch?
        r.seek(SeekFrom::Start(offset))?;
        self.inode_indexes = vec![0u32; table_size];
        let (_, data, _) = unsafe { self.inode_indexes.align_to_mut::<u8>() };
        r.read_exact(data)?;
        Ok(())
    }
pub fn load_from ( & mut self , r : & mut RafsIoReader , offset : u64 , table_size : usize , ) -> Result < ( ) > { // Map prefetch table in. // TODO: Need to consider about backend switch? r . seek ( SeekFrom :: Start ( offset ) ) ? ; self . inode_indexes = vec ! [ 0u32 table_size ] ; let ( _ , data , _ ) = unsafe { self . inode_indexes . align_to_mut :: < u8 > ( ) } ; r . read_exact ( data ) ? ; Ok ( ( ) ) }
Note: This method changes file offset.
Note : This method changes file offset .
&mut self
r
&mut RafsIoReader
offset
u64
table_size
usize