Struct object::pe::ImageDataDirectory
source · #[repr(C)]pub struct ImageDataDirectory {
pub virtual_address: U32<LittleEndian>,
pub size: U32<LittleEndian>,
}
Fields§
§virtual_address: U32<LittleEndian>
§size: U32<LittleEndian>
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(&self, sections: &SectionTable<'_>) -> Result<(u32, u32)>
pub fn file_range(&self, sections: &SectionTable<'_>) -> 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 moresource§impl Debug for ImageDataDirectory
impl Debug for ImageDataDirectory
impl Copy for ImageDataDirectory
impl Pod for ImageDataDirectory
Auto Trait Implementations§
impl Freeze for ImageDataDirectory
impl RefUnwindSafe for ImageDataDirectory
impl Send for ImageDataDirectory
impl Sync for ImageDataDirectory
impl Unpin for ImageDataDirectory
impl UnwindSafe for ImageDataDirectory
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