pub struct CacheEntry {
pub library_name: String,
pub library_path: String,
pub flags: i32,
pub hwcap: Option<u64>,
}Expand description
A processed library entry extracted from the cache.
This represents a single library mapping with resolved strings and optional hardware capability information.
§Fields
library_name- The library name (e.g., “libc.so.6”)library_path- Full path to the library fileflags- Library type flags (bit 0: ELF library)hwcap- Hardware capabilities (None for old format entries)
§Serialization
When serialized to JSON, hardware capabilities are formatted as hexadecimal strings (e.g., “0x0000000000001000”).
§Example
let entry = CacheEntry {
library_name: "libc.so.6".to_string(),
library_path: "/lib/x86_64-linux-gnu/libc.so.6".to_string(),
flags: 1, // ELF library
hwcap: Some(0x1000), // Some hardware capability
};
// Check if it's an ELF library
let is_elf = entry.flags & 1 != 0;
assert!(is_elf);
// Check for hardware capabilities
if let Some(hwcap) = entry.hwcap {
println!("Hardware capabilities: 0x{:016x}", hwcap);
}Fields§
§library_name: String§library_path: String§flags: i32§hwcap: Option<u64>Trait Implementations§
Source§impl Clone for CacheEntry
impl Clone for CacheEntry
Source§fn clone(&self) -> CacheEntry
fn clone(&self) -> CacheEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CacheEntry
impl Debug for CacheEntry
Source§impl PartialEq for CacheEntry
impl PartialEq for CacheEntry
Source§impl Serialize for CacheEntry
impl Serialize for CacheEntry
impl StructuralPartialEq for CacheEntry
Auto Trait Implementations§
impl Freeze for CacheEntry
impl RefUnwindSafe for CacheEntry
impl Send for CacheEntry
impl Sync for CacheEntry
impl Unpin for CacheEntry
impl UnwindSafe for CacheEntry
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