pub trait StructLayout {
const ADDRESS_WIDTH: u64;
// Required methods
fn read_va<Driver>(
vmi: VmiState<'_, WindowsOs<Driver>>,
ctx: impl Into<AccessContext>,
) -> Result<Va, VmiError>
where Driver: VmiRead,
Driver::Architecture: ArchAdapter<Driver>;
fn read_unicode_string<Driver>(
vmi: VmiState<'_, WindowsOs<Driver>>,
ctx: impl Into<AccessContext>,
) -> Result<String, VmiError>
where Driver: VmiRead,
Driver::Architecture: ArchAdapter<Driver>;
}Expand description
Pointer-width-dependent operations for reading Windows structures.
Windows structures contain pointer-sized fields (PVOID, UNICODE_STRING,
LIST_ENTRY, …) whose layout differs between 32-bit and 64-bit processes.
This trait abstracts over the pointer width so that structure accessors can
be generic over both layouts.
Required Associated Constants§
Sourceconst ADDRESS_WIDTH: u64
const ADDRESS_WIDTH: u64
The address width (i.e. pointer size) in bytes.
Required Methods§
Sourcefn read_va<Driver>(
vmi: VmiState<'_, WindowsOs<Driver>>,
ctx: impl Into<AccessContext>,
) -> Result<Va, VmiError>
fn read_va<Driver>( vmi: VmiState<'_, WindowsOs<Driver>>, ctx: impl Into<AccessContext>, ) -> Result<Va, VmiError>
Reads a pointer-sized virtual address from guest memory.
Sourcefn read_unicode_string<Driver>(
vmi: VmiState<'_, WindowsOs<Driver>>,
ctx: impl Into<AccessContext>,
) -> Result<String, VmiError>
fn read_unicode_string<Driver>( vmi: VmiState<'_, WindowsOs<Driver>>, ctx: impl Into<AccessContext>, ) -> Result<String, VmiError>
Reads a UNICODE_STRING from guest memory.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.