pub trait DecodeEntry {
// Required methods
fn put(
&mut self,
pack_id: u32,
offset: u64,
data: &[u8],
kind: Kind,
compressed_size: usize,
);
fn get(
&mut self,
pack_id: u32,
offset: u64,
out: &mut Vec<u8>,
) -> Option<(Kind, usize)>;
}Expand description
A trait to model putting objects at a given pack offset into a cache, and fetching them.
It is used to speed up pack traversals.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<T: DecodeEntry + ?Sized> DecodeEntry for Box<T>
impl<T: DecodeEntry + ?Sized> DecodeEntry for Box<T>
Implementors§
impl DecodeEntry for MemoryCappedHashmap
Available on (crate features
pack-cache-lru-dynamic or pack-cache-lru-static) and crate feature pack-cache-lru-dynamic only.impl DecodeEntry for Never
impl<const SIZE: usize> DecodeEntry for StaticLinkedList<SIZE>
Available on (crate features
pack-cache-lru-dynamic or pack-cache-lru-static) and crate feature pack-cache-lru-static only.