pub fn new(f: &mut File) -> Result<FileTypeIdentifier> {
        f.seek(SeekFrom::Start(FILE_START))
            .map_err(VhdxHeaderError::SeekFileTypeIdentifier)?;
        let signature = f
            .read_u64::<LittleEndian>()
            .map_err(VhdxHeaderError::ReadFileTypeIdentifier)?;
        if signature != VHDX_SIGN {
            return Err(VhdxHeaderError::InvalidVHDXSign);
        }

        Ok(FileTypeIdentifier { signature })
    }
/// Reads the File Type Identifier structure from a reference VHDx file
Reads the File Type Identifier structure from a reference VHDx file
Reads the File Type Identifier structure from a reference VHDx file
pub fn new(f: &mut File) -> Result<FileTypeIdentifier> {
        f.seek(SeekFrom::Start(FILE_START))
            .map_err(VhdxHeaderError::SeekFileTypeIdentifier)?;
        let signature = f
            .read_u64::<LittleEndian>()
            .map_err(VhdxHeaderError::ReadFileTypeIdentifier)?;
        if signature != VHDX_SIGN {
            return Err(VhdxHeaderError::InvalidVHDXSign);
        }
        Ok(FileTypeIdentifier { signature })
    }
pub fn new ( f : & mut File ) -> Result < FileTypeIdentifier > { f . seek ( SeekFrom :: Start ( FILE_START ) ) . map_err ( VhdxHeaderError :: SeekFileTypeIdentifier ) ? ; let signature = f . read_u64 :: < LittleEndian > ( ) . map_err ( VhdxHeaderError :: ReadFileTypeIdentifier ) ? ; if signature != VHDX_SIGN { return Err ( VhdxHeaderError :: InvalidVHDXSign ) ; } Ok ( FileTypeIdentifier { signature } ) }
Reads the File Type Identifier structure from a reference VHDx file
Reads the File Type Identifier structure from a reference VHDx file
f
&mut File
f
&mut File