pub struct DyldCache {
pub header: DyldCacheHeader,
pub mappings: Vec<CacheMapping>,
pub images: Vec<CacheImage>,
pub subcaches: Vec<SubCacheEntry>,
}Expand description
Read-only index of a dyld shared cache file.
Supports enumeration and extraction of embedded Mach-O images without
modifying the cache. Extracted image slices can be fed directly into
crate::format::parse for normal inspection.
Fields§
§header: DyldCacheHeaderThe header field.
mappings: Vec<CacheMapping>The mappings field.
images: Vec<CacheImage>The images field.
subcaches: Vec<SubCacheEntry>Subcache files required by this cache, in header order.
Implementations§
Source§impl DyldCache
impl DyldCache
Sourcepub fn images(&self) -> &[CacheImage]
pub fn images(&self) -> &[CacheImage]
List all embedded images.
Sourcepub fn mappings(&self) -> &[CacheMapping]
pub fn mappings(&self) -> &[CacheMapping]
List cache memory mappings.
Sourcepub fn subcaches(&self) -> &[SubCacheEntry]
pub fn subcaches(&self) -> &[SubCacheEntry]
Required sibling-cache declarations in deterministic header order.
Sourcepub fn va_to_file_offset(&self, va: u64) -> Option<u64>
pub fn va_to_file_offset(&self, va: u64) -> Option<u64>
Convert a virtual address to a file offset using the mapping table.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DyldCache
impl RefUnwindSafe for DyldCache
impl Send for DyldCache
impl Sync for DyldCache
impl Unpin for DyldCache
impl UnsafeUnpin for DyldCache
impl UnwindSafe for DyldCache
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