Struct object::pe::ImageDataDirectory
source · [−]Fields
virtual_address: U32<LE>
size: U32<LE>
Implementations
sourceimpl 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
sourceimpl Clone for ImageDataDirectory
impl Clone for ImageDataDirectory
sourcefn clone(&self) -> ImageDataDirectory
fn clone(&self) -> ImageDataDirectory
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ImageDataDirectory
impl Debug for ImageDataDirectory
impl Copy for ImageDataDirectory
impl Pod for ImageDataDirectory
Auto Trait Implementations
impl RefUnwindSafe for ImageDataDirectory
impl Send for ImageDataDirectory
impl Sync for ImageDataDirectory
impl Unpin for ImageDataDirectory
impl UnwindSafe for ImageDataDirectory
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more