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 13 : fn default() -> Config {
12 13 : Config { linkedit: true }
13 13 : }
14 : }
15 :
16 : impl Config {
17 : #[doc(hidden)]
18 13 : pub fn to_ffi(&self) -> ffi::MachO_Binary_write_config_t {
19 13 : ffi::MachO_Binary_write_config_t {
20 13 : linkedit: self.linkedit,
21 13 : }
22 13 : }
23 : }
|