pub struct Dylib<'a> { /* private fields */ }
Expand description
This structure represents a library embedded in a dyld shared cache.
It mirrors the original dyld_cache_image_info
structure.
Implementations§
§impl Dylib<'_>
impl Dylib<'_>
pub fn inode(&self) -> u64
pub fn inode(&self) -> u64
File serial number matching stat.st_ino
or 0
Note that for shared cache targeting iOS, this value can hold a hash of the path (if modtime is set to 0)
pub fn get(&self) -> Option<Binary>
pub fn get(&self) -> Option<Binary>
Get a Binary
representation for this Dylib.
One can use this function to write back the Mach-O binary on the disk:
dylib.get().expect("Can't extract").write("liblockdown.dylib");
pub fn get_with_opt(&self, opt: &ExtractOpt) -> Option<Binary>
pub fn get_with_opt(&self, opt: &ExtractOpt) -> Option<Binary>
Get a Binary
representation for this Dylib with the provided ExtractOpt
options.
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Dylib<'a>
impl<'a> !Send for Dylib<'a>
impl<'a> !Sync for Dylib<'a>
impl<'a> Unpin for Dylib<'a>
impl<'a> UnwindSafe for Dylib<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more