pub struct ElfCache { /* private fields */ }Expand description
Parses each ELF object at most once, keyed by host path.
Implementations§
Source§impl ElfCache
impl ElfCache
pub fn new() -> ElfCache
Sourcepub fn get(&mut self, host: &Path) -> Result<Option<ElfMetadata>>
pub fn get(&mut self, host: &Path) -> Result<Option<ElfMetadata>>
Parse host as ELF. Ok(None) means the file exists but is not a usable
ELF object.
Sourcepub fn require(&mut self, host: &Path) -> Result<ElfMetadata>
pub fn require(&mut self, host: &Path) -> Result<ElfMetadata>
Like ElfCache::get, but a parse failure is an error rather than None.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ElfCache
impl RefUnwindSafe for ElfCache
impl Send for ElfCache
impl Sync for ElfCache
impl Unpin for ElfCache
impl UnsafeUnpin for ElfCache
impl UnwindSafe for ElfCache
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