edlang/object/read/pe/trait.ImageOptionalHeader.html

35 lines
26 KiB
HTML
Raw Normal View History

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="A trait for generic access to `pe::ImageOptionalHeader32` and `pe::ImageOptionalHeader64`."><title>ImageOptionalHeader in object::read::pe - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../static.files/rustdoc-ac92e1bbe349e143.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="object" data-themes="" data-resource-suffix="" data-rustdoc-version="1.76.0 (07dca489a 2024-02-04)" data-channel="1.76.0" data-search-js="search-2b6ce74ff89ae146.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../../static.files/storage-f2adc0d6ca4d09fb.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-305769736d49e732.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-feafe1bb7466e4bd.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../object/index.html">object</a><span class="version">0.32.2</span></h2></div><h2 class="location"><a href="#">ImageOptionalHeader</a></h2><div class="sidebar-elems"><section><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.address_of_entry_point">address_of_entry_point</a></li><li><a href="#tymethod.base_of_code">base_of_code</a></li><li><a href="#tymethod.base_of_data">base_of_data</a></li><li><a href="#tymethod.check_sum">check_sum</a></li><li><a href="#tymethod.dll_characteristics">dll_characteristics</a></li><li><a href="#tymethod.file_alignment">file_alignment</a></li><li><a href="#tymethod.image_base">image_base</a></li><li><a href="#tymethod.loader_flags">loader_flags</a></li><li><a href="#tymethod.magic">magic</a></li><li><a href="#tymethod.major_image_version">major_image_version</a></li><li><a href="#tymethod.major_linker_version">major_linker_version</a></li><li><a href="#tymethod.major_operating_system_version">major_operating_system_version</a></li><li><a href="#tymethod.major_subsystem_version">major_subsystem_version</a></li><li><a href="#tymethod.minor_image_version">minor_image_version</a></li><li><a href="#tymethod.minor_linker_version">minor_linker_version</a></li><li><a href="#tymethod.minor_operating_system_version">minor_operating_system_version</a></li><li><a href="#tymethod.minor_subsystem_version">minor_subsystem_version</a></li><li><a href="#tymethod.number_of_rva_and_sizes">number_of_rva_and_sizes</a></li><li><a href="#tymethod.section_alignment">section_alignment</a></li><li><a href="#tymethod.size_of_code">size_of_code</a></li><li><a
<main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../../object/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Trait <a href="../../index.html">object</a>::<wbr><a href="../index.html">read</a>::<wbr><a href="index.html">pe</a>::<wbr><a class="trait" href="#">ImageOptionalHeader</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../../src/object/read/pe/file.rs.html#652-686">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub trait ImageOptionalHeader: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> + <a class="trait" href="../../pod/trait.Pod.html" title="trait object::pod::Pod">Pod</a> {
<details class="toggle type-contents-toggle"><summary class="hideme"><span>Show 30 methods</span></summary> // Required methods
fn <a href="#tymethod.magic" class="fn">magic</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u16.html">u16</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.major_linker_version" class="fn">major_linker_version</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u8.html">u8</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.minor_linker_version" class="fn">minor_linker_version</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u8.html">u8</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.size_of_code" class="fn">size_of_code</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u32.html">u32</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.size_of_initialized_data" class="fn">size_of_initialized_data</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u32.html">u32</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.size_of_uninitialized_data" class="fn">size_of_uninitialized_data</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u32.html">u32</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.address_of_entry_point" class="fn">address_of_entry_point</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u32.html">u32</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.base_of_code" class="fn">base_of_code</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u32.html">u32</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.base_of_data" class="fn">base_of_data</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u32.html">u32</a>&gt;;
<span class="item-spacer"></span> fn <a href="#tymethod.image_base" class="fn">image_base</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u64.html">u64</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.section_alignment" class="fn">section_alignment</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u32.html">u32</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.file_alignment" class="fn">file_alignment</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u32.html">u32</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.major_operating_system_version" class="fn">major_operating_system_version</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u16.html">u16</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.minor_operating_system_version" class="fn">minor_operating_system_version</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u16.html">u16</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.major_image_version" class="fn">major_image_version</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u16.html">u16</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.minor_image_version" class="fn">minor_image_version</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u16.html">u16</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.major_subsystem_version" class="fn">major_subsystem_version</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u16.html">u16</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.minor_subsystem_version" class="fn">minor_subsystem_version</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u16.html">u16</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.win32_version_value" class="fn">win32_version_value</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u32.html">u32</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.size_of_image" class="fn">size_of_image</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u32.html">u32</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.size_of_headers" class="fn">size_of_headers</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u32.html">u32</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.check_sum" class="fn">check_sum</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u32.html">u32</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.subsystem" class="fn">subsystem</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u16.html">u16</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.dll_characteristics" class="fn">dll_characteristics</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u16.html">u16</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.size_of_stack_reserve" class="fn">size_of_stack_reserve</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u64.html">u64</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.size_of_stack_commit" class="fn">size_of_stack_commit</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u64.html">u64</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.size_of_heap_reserve" class="fn">size_of_heap_reserve</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u64.html">u64</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.size_of_heap_commit" class="fn">size_of_heap_commit</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u64.html">u64</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.loader_flags" class="fn">loader_flags</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u32.html">u32</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.number_of_rva_and_sizes" class="fn">number_of_rva_and_sizes</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u32.html">u32</a>;
</details>}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A trait for generic access to <a href="../../pe/struct.ImageOptionalHeader32.html" title="struct object::pe::ImageOptionalHeader32"><code>pe::ImageOptionalHeader32</code></a> and <a href="../../pe/struct.ImageOptionalHeader64.html" title="struct object::pe::ImageOptionalHeader64"><code>pe::ImageOptionalHeader64</code></a>.</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><section id="tymethod.magic" class="method"><a class="src rightside" href="../../../src/object/read/pe/file.rs.html#654">source</a><h4 class="code-header">fn <a href="#tymethod.magic" class="fn">magic</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u16.html">u16</a></h4></section><section id="tymethod.major_linker_version" class="method"><a class="src rightside" href="../../../src/object/read/pe/file.rs.html#655">source</a><h4 class="code-header">fn <a href="#tymethod.major_linker_version" class="fn">major_linker_version</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u8.html">u8</a></h4></section><section id="tymethod.minor_linker_version" class="method"><a class="src rightside" href="../../../src/object/read/pe/file.rs.html#656">source</a><h4 class="code-header">fn <a href="#tymethod.minor_linker_version" class="fn">minor_linker_version</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u8.html">u8</a></h4></section><section id="tymethod.size_of_code" class="method"><a class="src rightside" href="../../../src/object/read/pe/file.rs.html#657">source</a><h4 class="code-header">fn <a href="#tymethod.size_of_code" class="fn">size_of_code</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u32.html">u32</a></h4></section><section id="tymethod.size_of_initialized_data" class="method"><a class="src rightside" href="../../../src/object/read/pe/file.rs.html#658">source</a><h4 class="code-header">fn <a href="#tymethod.size_of_initialized_data" class="fn">size_of_initialized_data</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u32.html">u32</a></h4></section><section id="tymethod.size_of_uninitialized_data" class="method"><a class="src rightside" href="../../../src/object/read/pe/file.rs.html#659">source</a><h4 class="code-header">fn <a href="#tymethod.size_of_uninitialized_data" class="fn">size_of_uninitialized_data</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u32.html">u32</a></h4></section><section id="tymethod.address_of_entry_point" class="method"><a class="src rightside" href="../../../src/object/read/pe/file.rs.html#660">source</a><h4 class="code-header">fn <a href="#tymethod.address_of_entry_point" class="fn">address_of_entry_point</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u32.html">u32</a></h4></section><section id="tymethod.base_of_code" class="method"><a class="src rightside" href="../../../src/object/read/pe/file.rs.html#661">source</a><h4 class="code-header">fn <a href="#tymethod.base_of_code" class="fn">base_of_code</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u32.html">u32</a></h4></section><section id="tymethod.base_of_data" class="method"><a class="src rightside" href="../../../src/object/read/pe/file.rs.html#662">source</a><h4 class="code-header">fn <a href="#tymethod.base_of_data" class="fn">base_of_data</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u32.html">u32</a>&gt;</h4></section><section id="tymethod.image_base" class="method"><a class="src rightside" href="../../../src/object/read/pe/file.rs.html#665">source</a><h4 class="code-header">fn <a href="#tymethod.image_base" class="fn">image_base</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/core/primitive.u64.html">u64</a></h4></section><section id="tymethod.section_alignment" class="method"><a class="src rightside" href="../../../src/object/read/pe/file.rs.html#666">source</a><h4 class="code-header">fn <a href