pub struct LdCache { /* private fields */ }Implementations§
Source§impl LdCache
impl LdCache
Sourcepub fn parse(bytes: &[u8]) -> LdCache
pub fn parse(bytes: &[u8]) -> LdCache
Parse a cache image. A malformed cache yields no entries instead of failing the build; the cache is a hint and the search paths remain.
pub fn load(path: &Path) -> Option<LdCache>
pub fn lookup(&self, soname: &str) -> &[PathBuf]
Sourcepub fn lookup_compatible(
&self,
soname: &str,
architecture: &Architecture,
) -> Vec<PathBuf>
pub fn lookup_compatible( &self, soname: &str, architecture: &Architecture, ) -> Vec<PathBuf>
Candidates usable by a portable bundle for architecture.
Cache flags encode the ELF ABI. Entries requiring an OS version or CPU hwcap are intentionally skipped because a sysroot does not establish a deployment kernel or CPU baseline.
Sourcepub fn entry_count(&self) -> usize
pub fn entry_count(&self) -> usize
Candidates the cache holds, counting a soname once per distinct path.
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LdCache
impl RefUnwindSafe for LdCache
impl Send for LdCache
impl Sync for LdCache
impl Unpin for LdCache
impl UnsafeUnpin for LdCache
impl UnwindSafe for LdCache
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