pub fn try_load_from_file_offset(
        file: &mut File,
        table_offset: u64,
        table_len: usize,
    ) -> Result<Self, Error> {
        if table_len < Header::SIZE + 2 {
            return Err(Error::new(
                ErrorKind::InvalidData,
                format!("The table has an invalid size: {}", table_len),
            ));
        }

        file.seek(SeekFrom::Start(table_offset))?;
        let mut table = Vec::with_capacity(table_len);
        table.resize(table_len, 0);
        file.read_exact(&mut table)?;
        Ok(table.into())
    }
/// Load an [UndefinedStructTable] by seeking and reading the file offsets.
Load an [UndefinedStructTable] by seeking and reading the file offsets.
Load an [ UndefinedStructTable ] by seeking and reading the file offsets .
pub fn try_load_from_file_offset(
        file: &mut File,
        table_offset: u64,
        table_len: usize,
    ) -> Result<Self, Error> {
        if table_len < Header::SIZE + 2 {
            return Err(Error::new(
                ErrorKind::InvalidData,
                format!("The table has an invalid size: {}", table_len),
            ));
        }
        file.seek(SeekFrom::Start(table_offset))?;
        let mut table = Vec::with_capacity(table_len);
        table.resize(table_len, 0);
        file.read_exact(&mut table)?;
        Ok(table.into())
    }
pub fn try_load_from_file_offset ( file : & mut File , table_offset : u64 , table_len : usize , ) -> Result < Self , Error > { if table_len < Header :: SIZE + 2 { return Err ( Error :: new ( ErrorKind :: InvalidData , format ! ( " " table_len ) , ) ) ; } file . seek ( SeekFrom :: Start ( table_offset ) ) ? ; let mut table = Vec :: with_capacity ( table_len ) ; table . resize ( table_len , 0 ) ; file . read_exact ( & mut table ) ? ; Ok ( table . into ( ) ) }
Load an [UndefinedStructTable] by seeking and reading the file offsets.
Load an [ UndefinedStructTable ] by seeking and reading the file offsets .
file
&mut File
table_offset
u64
table_len
usize
file
&mut File
table_offset
u64
table_len
usize