#[repr(C)]pub struct ImageResourceDirectory {
pub characteristics: u32,
pub time_date_stamp: u32,
pub major_version: u16,
pub minor_version: u16,
pub number_of_named_entries: u16,
pub number_of_id_entries: u16,
}Expand description
Represents an image resource directory in the PE (Portable Executable) format.
Fields§
§characteristics: u32The characteristics of the resource directory.
time_date_stamp: u32The timestamp of when the resource directory was created.
major_version: u16The major version of the resource directory.
minor_version: u16The minor version of the resource directory.
number_of_named_entries: u16The number of named entries in the resource directory.
number_of_id_entries: u16The number of ID entries in the resource directory.
Implementations§
Source§impl<'a> ImageResourceDirectory
impl<'a> ImageResourceDirectory
pub fn parse( bytes: &'a [u8], dd: DataDirectory, sections: &[SectionTable], file_alignment: u32, ) -> Result<Self>
pub fn parse_with_opts( bytes: &'a [u8], dd: DataDirectory, sections: &[SectionTable], file_alignment: u32, opts: &ParseOptions, ) -> Result<Self>
Sourcepub fn count(&self) -> u16
pub fn count(&self) -> u16
Counts the total number of resource entries (both named and ID entries).
Returns the sum of ImageResourceDirectory::number_of_id_entries and ImageResourceDirectory::number_of_named_entries
from the ImageResourceDirectory.
Sourcepub fn entries_size(&self) -> usize
pub fn entries_size(&self) -> usize
Returns the total size of entries in bytes
Trait Implementations§
Source§impl Clone for ImageResourceDirectory
impl Clone for ImageResourceDirectory
Source§fn clone(&self) -> ImageResourceDirectory
fn clone(&self) -> ImageResourceDirectory
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ImageResourceDirectory
Source§impl Debug for ImageResourceDirectory
impl Debug for ImageResourceDirectory
Source§impl Default for ImageResourceDirectory
impl Default for ImageResourceDirectory
Source§fn default() -> ImageResourceDirectory
fn default() -> ImageResourceDirectory
Returns the “default value” for a type. Read more
Source§impl PartialEq for ImageResourceDirectory
impl PartialEq for ImageResourceDirectory
Source§fn eq(&self, other: &ImageResourceDirectory) -> bool
fn eq(&self, other: &ImageResourceDirectory) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ImageResourceDirectory
Source§impl<'a> TryFromCtx<'a, Endian> for ImageResourceDirectorywhere
ImageResourceDirectory: 'a,
impl<'a> TryFromCtx<'a, Endian> for ImageResourceDirectorywhere
ImageResourceDirectory: 'a,
Source§impl<'a> TryIntoCtx<Endian> for &'a ImageResourceDirectory
impl<'a> TryIntoCtx<Endian> for &'a ImageResourceDirectory
Auto Trait Implementations§
impl Freeze for ImageResourceDirectory
impl RefUnwindSafe for ImageResourceDirectory
impl Send for ImageResourceDirectory
impl Sync for ImageResourceDirectory
impl Unpin for ImageResourceDirectory
impl UnsafeUnpin for ImageResourceDirectory
impl UnwindSafe for ImageResourceDirectory
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