pub struct StrategyPackageImporter { /* private fields */ }Implementations§
Source§impl StrategyPackageImporter
impl StrategyPackageImporter
pub fn open(portable_root: &Path) -> Result<Self>
pub fn prepare_bytes(&self, bytes: &[u8]) -> Result<PreparedPackage>
pub fn prepared(&self, preparation_id: &str) -> Result<PreparedPackage>
Sourcepub fn open_restored(portable_root: &Path) -> Result<Option<Self>>
pub fn open_restored(portable_root: &Path) -> Result<Option<Self>>
Open the restored package store only when the recovery actually carried one.
A data root whose committed revisions never existed is legitimate; reading it back must not create package state merely to observe its absence.
Sourcepub fn restore_revision_invariants(&self) -> Result<Vec<String>>
pub fn restore_revision_invariants(&self) -> Result<Vec<String>>
Re-establish the immutable revision invariant and read every revision back.
A generic archive restore publishes each member under fresh permissions, so the
read-only hardening applied when a revision was committed is gone even though
every byte is intact. This re-applies that same hardening through this owner and
then verifies each revision digest, semantics digest and asset inventory through
the ordinary verified_revision_content readback. No revision byte is rewritten;
a missing, altered or unexpected revision is refused instead of accepted.