/// Read the DOS header.
///
/// Also checks that the `e_magic` field in the header is valid.
Read the DOS header.
Also checks that the `e_magic` field in the header is valid.
Read the DOS header . Also checks that the ` e_magic ` field in the header is valid .
pub fn parse<'data>(data: Bytes<'data>) -> read::Result<&'data Self> {
        // DOS header comes first.
        let dos_header = data
            .read_at::<pe::ImageDosHeader>(0)
            .read_error("Invalid DOS header size or alignment")?;
        if dos_header.e_magic.get(LE) != pe::IMAGE_DOS_SIGNATURE {
            return Err(Error("Invalid DOS magic"));
        }
        Ok(dos_header)
    }
pub fn parse < ' data > ( data : Bytes < ' data > ) -> read :: Result < & ' data Self > { // DOS header comes first. let dos_header = data . read_at :: < pe :: ImageDosHeader > ( 0 ) . read_error ( " " ) ? ; if dos_header . e_magic . get ( LE ) != pe :: IMAGE_DOS_SIGNATURE { return Err ( Error ( " " ) ) ; } Ok ( dos_header ) }
Read the DOS header.
Read the DOS header .
data
Bytes<'data>