pub struct ApkKey { /* private fields */ }Expand description
Identity of an APK for cache purposes.
A program of several archives has a key of its own (rendered results,
L3, and MemoryCache go by it), and each archive its own key too: L1
and L2 files of an entry live under its archive’s key, by its name inside
the archive (ApkKey::locate). Rewriting one jar of a program then
costs that jar’s entries only, and a jar read alone shares them with the
same jar read as part of a program.
Implementations§
Source§impl ApkKey
impl ApkKey
Sourcepub fn for_apk(apk: &Apk) -> Result<ApkKey>
pub fn for_apk(apk: &Apk) -> Result<ApkKey>
Derive the key from the file size, mtime and a hash of the central directory (so a rewritten archive with the same size is not confused with the old one); for a program of several archives, from those of each and its path, in order.
pub fn as_str(&self) -> &str
Trait Implementations§
impl Eq for ApkKey
Auto Trait Implementations§
impl Forget for ApkKey
impl Freeze for ApkKey
impl Move for ApkKey
impl RefUnwindSafe for ApkKey
impl Send for ApkKey
impl Sync for ApkKey
impl Unpin for ApkKey
impl UnsafeUnpin for ApkKey
impl UnwindSafe for ApkKey
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