Struct goblin::pe::optional_header::OptionalHeader
source · pub struct OptionalHeader {
pub standard_fields: StandardFields,
pub windows_fields: WindowsFields,
pub data_directories: DataDirectories,
}
Expand description
Unified 32/64-bit optional header (for PE32
and PE32+
).
Optional header is the most important of the NT headers. Although it’s called “optional”, it’s actually required for PE image files.
It is meant to represent either
Whether it’s 32 or 64-bit is determined by the StandardFields::magic
and by the value
CoffHeader::size_of_optional_header
.
§Position in PE binary
The optional header is located after CoffHeader
and before
section table.
Fields§
§standard_fields: StandardFields
Unified standard (COFF) fields. See StandardFields
to learn more.
windows_fields: WindowsFields
Unified Windows fields. See WindowsFields
to learn more.
data_directories: DataDirectories
Data directories. See DataDirectories
to learn more.
Implementations§
Trait Implementations§
source§impl Clone for OptionalHeader
impl Clone for OptionalHeader
source§fn clone(&self) -> OptionalHeader
fn clone(&self) -> OptionalHeader
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for OptionalHeader
impl Debug for OptionalHeader
source§impl PartialEq for OptionalHeader
impl PartialEq for OptionalHeader
source§fn eq(&self, other: &OptionalHeader) -> bool
fn eq(&self, other: &OptionalHeader) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> TryFromCtx<'a, Endian> for OptionalHeader
impl<'a> TryFromCtx<'a, Endian> for OptionalHeader
source§impl TryIntoCtx<Endian> for OptionalHeader
impl TryIntoCtx<Endian> for OptionalHeader
impl Copy for OptionalHeader
impl StructuralPartialEq for OptionalHeader
Auto Trait Implementations§
impl Freeze for OptionalHeader
impl RefUnwindSafe for OptionalHeader
impl Send for OptionalHeader
impl Sync for OptionalHeader
impl Unpin for OptionalHeader
impl UnwindSafe for OptionalHeader
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more