Line data Source code
1 : use lief_ffi as ffi;
2 :
3 : /// Structure used to configure the [`crate::macho::Binary::write_with_config`] operation
4 0 : #[derive(Debug)]
5 : pub struct Config {
6 : /// Rebuild the `__LINKEDIT` segment
7 : pub linkedit: bool,
8 : }
9 :
10 : impl Default for Config {
11 10 : fn default() -> Config {
12 10 : Config {
13 10 : linkedit: true,
14 10 : }
15 10 : }
16 : }
17 :
18 : impl Config {
19 : #[doc(hidden)]
20 10 : pub fn to_ffi(&self) -> ffi::MachO_Binary_write_config_t {
21 10 : ffi::MachO_Binary_write_config_t {
22 10 : linkedit: self.linkedit,
23 10 : }
24 10 : }
25 : }
|