[−][src]Struct mz16::header::Header
A definition of a header in a 16 bit dos executable
Fields
signature: u16
extra_bytes: u16
pages: u16
reloc_items: u16
header_size: u16
min_alloc: u16
max_alloc: u16
init_ss: u16
init_sp: u16
checksum: u16
init_ip: u16
init_cs: u16
reloc_table: u16
overlay: u16
Methods
impl Header
[src]
pub fn from_words(words: [u16; 14]) -> Result<Header, HeaderError>
[src]
Read a header from 14 16-bit words
pub fn new(bytes: &[u8]) -> Result<Header, HeaderError>
[src]
Read a header from bytes
pub fn exe_data_start(&self) -> usize
[src]
Get the start of the exe data
pub fn extra_data_start(&self) -> usize
[src]
Get the start of the extra data
pub fn relocation_table_start(&self) -> usize
[src]
Get the start of the relocation table
pub fn relocation_table_end(&self) -> usize
[src]
Get the end of the relocation table
pub fn exe_data<'a>(&self, bytes: &'a [u8]) -> &'a [u8]
[src]
Get the exe data as a slice
pub fn extra_data<'a>(&self, bytes: &'a [u8]) -> &'a [u8]
[src]
Get the extra data as a slice
pub fn header_data<'a>(&self, bytes: &'a [u8]) -> &'a [u8]
[src]
Get the header data
pub fn relocation_table_data<'a>(&self, bytes: &'a [u8]) -> &'a [u8]
[src]
Get the relocation table data
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,