Struct object::pe::ImageDataDirectory
source · Fields§
§virtual_address: U32<LE>
§size: U32<LE>
Implementations§
source§impl ImageDataDirectory
impl ImageDataDirectory
sourcepub fn address_range(&self) -> (u32, u32)
pub fn address_range(&self) -> (u32, u32)
Return the virtual address range of this directory entry.
sourcepub fn file_range<'data>(
&self,
sections: &SectionTable<'data>
) -> Result<(u32, u32)>
pub fn file_range<'data>(
&self,
sections: &SectionTable<'data>
) -> Result<(u32, u32)>
Return the file offset and size of this directory entry.
This function has some limitations:
- It requires that the data is contained in a single section.
- It uses the size field of the directory entry, which is not desirable for all data directories.
- It uses the
virtual_address
of the directory entry as an address, which is not valid forIMAGE_DIRECTORY_ENTRY_SECURITY
.
sourcepub fn data<'data, R: ReadRef<'data>>(
&self,
data: R,
sections: &SectionTable<'data>
) -> Result<&'data [u8]>
pub fn data<'data, R: ReadRef<'data>>(
&self,
data: R,
sections: &SectionTable<'data>
) -> Result<&'data [u8]>
Get the data referenced by this directory entry.
This function has some limitations:
- It requires that the data is contained in a single section.
- It uses the size field of the directory entry, which is not desirable for all data directories.
- It uses the
virtual_address
of the directory entry as an address, which is not valid forIMAGE_DIRECTORY_ENTRY_SECURITY
.
Trait Implementations§
source§impl Clone for ImageDataDirectory
impl Clone for ImageDataDirectory
source§fn clone(&self) -> ImageDataDirectory
fn clone(&self) -> ImageDataDirectory
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 more