Debian Codegraph @

third_party/rust/goblin/src/pe/options.rs

raw
1 /// Parsing Options structure for the PE parser
2 #[derive(Debug, Copy, Clone)]
3 pub struct ParseOptions {
4 /// Wether the parser should resolve rvas or not. Default: true
5 pub resolve_rva: bool,
6 /// Whether or not to parse attribute certificates.
7 /// Set to false for in-memory representation, as the [loader does not map this info into
8 /// memory](https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#other-contents-of-the-file).
9 /// For on-disk representations, leave as true. Default: true
10 pub parse_attribute_certificates: bool,
11 }
12
13 impl ParseOptions {
14 /// Returns a parse options structure with default values
15 pub fn default() -> Self {
16 ParseOptions {
17 resolve_rva: true,
18 parse_attribute_certificates: true,
19 }
20 }
21 }