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