pub trait BaseResolve: Send + Sync {
// Required method
fn resolve(&self, path: &str, verify: bool, depth: usize) -> Result<Vec<u8>>;
}Expand description
Resolve one entry’s fully-reconstructed bytes by path.
Implemented by ZnippyArchive. Kept a separate trait rather than a method
on the archive so that a storage model depends on the capability and not on
the concrete archive type.
Required Methods§
Sourcefn resolve(&self, path: &str, verify: bool, depth: usize) -> Result<Vec<u8>>
fn resolve(&self, path: &str, verify: bool, depth: usize) -> Result<Vec<u8>>
depth is how many resolutions deep the caller already is. It is passed
rather than tracked by the resolver because a resolver is shared across
concurrent reads and a counter on it would be a shared mutable — the
depth belongs to one reconstruction, not to the archive.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl BaseResolve for ZnippyArchive
The archive resolves a base by reconstructing that entry in full, through the same dispatch as any other read — so a base may itself be chunked or delta’d and neither model needs to know which.