pub struct Engine { /* private fields */ }Expand description
The install engine, bound to a $VANTA_HOME.
Implementations§
Source§impl Engine
impl Engine
Sourcepub fn open(home: impl AsRef<Path>) -> VtaResult<Engine>
pub fn open(home: impl AsRef<Path>) -> VtaResult<Engine>
Open the engine over home ($VANTA_HOME) with the default (permissive)
policy — checksum-gated, signatures verified when present. Use
Engine::open_with_policy to require signatures.
Sourcepub fn open_with_policy(
home: impl AsRef<Path>,
policy: Policy,
) -> VtaResult<Engine>
pub fn open_with_policy( home: impl AsRef<Path>, policy: Policy, ) -> VtaResult<Engine>
Open the engine with an explicit verification Policy (audit H2).
Sourcepub fn with_max_decompressed(self, max: u64) -> Self
pub fn with_max_decompressed(self, max: u64) -> Self
Override the decompressed-size ceiling (audit M8).
pub fn state(&self) -> &State
Sourcepub fn install_artifact(
&self,
tool: &str,
version: &str,
artifact: &Artifact,
) -> VtaResult<StoreKey>
pub fn install_artifact( &self, tool: &str, version: &str, artifact: &Artifact, ) -> VtaResult<StoreKey>
Install one resolved artifact for the current platform, returning its store key. Fetch → verify → materialize → publish → commit a generation. A store hit short-circuits fetch/verify/materialize.
Sourcepub fn install_artifact_reported(
&self,
tool: &str,
version: &str,
artifact: &Artifact,
reporter: &dyn Reporter,
) -> VtaResult<StoreKey>
pub fn install_artifact_reported( &self, tool: &str, version: &str, artifact: &Artifact, reporter: &dyn Reporter, ) -> VtaResult<StoreKey>
Like Engine::install_artifact, but drives reporter with download
byte counts and phase transitions so a caller can render progress.
Sourcepub fn bundle_current(&self, out: &Path) -> VtaResult<usize>
pub fn bundle_current(&self, out: &Path) -> VtaResult<usize>
Bundle the active generation’s store entries into a portable archive
(docs/13-offline.md). Returns the number of entries written.