pub struct VolumeSet { /* private fields */ }Expand description
A primary physical container plus explicitly supplied companion volumes. No filenames are guessed, no graphs are flattened, and ambiguous owners fail. This reader does not yet certify a striped image’s composite block-map digest.
Implementations§
Source§impl VolumeSet
impl VolumeSet
Sourcepub fn verify_full(
&mut self,
image: &str,
expected_image_sha256: Option<&str>,
progress: impl FnMut(&str, u64, u64) -> ControlFlow<()>,
) -> Result<SetVerification>
pub fn verify_full( &mut self, image: &str, expected_image_sha256: Option<&str>, progress: impl FnMut(&str, u64, u64) -> ControlFlow<()>, ) -> Result<SetVerification>
Verifies the selected image, every owned stream, and each volume’s recorded integrity structures. Missing/unsupported references prevent all_match. Striped roots use the explicit supplied order; no ordering is guessed. Other images’ linear/root hashes are reported as unsupported. Metadata references are internal; expected_image_sha256 is an external media digest.
Source§impl VolumeSet
impl VolumeSet
Sourcepub fn open(paths: &[PathBuf]) -> Result<Self>
pub fn open(paths: &[PathBuf]) -> Result<Self>
Opens the primary and companions with a shared metadata/directory budget. The primary must contain the selected image’s complete Map. Named foreign volume references must be supplied; duplicate owners/volume IDs are errors.
Sourcepub fn open_with_limits(paths: &[PathBuf], limits: Limits) -> Result<Self>
pub fn open_with_limits(paths: &[PathBuf], limits: Limits) -> Result<Self>
Opens at most 128 volumes. Metadata bytes, triples, ZIP directory bytes, and entry counts are aggregate limits across the entire set. Chunk and member limits apply per object; only one volume retains payload caches.
Sourcepub fn images(&self) -> Vec<String>
pub fn images(&self) -> Vec<String>
Identifiers of physical images described by the primary volume.
Sourcepub fn sources(&self) -> Vec<VolumeSource>
pub fn sources(&self) -> Vec<VolumeSource>
Data stream ownership; metadata itself remains scoped to each volume.
Sourcepub fn reader_statistics(&self) -> ReaderStatistics
pub fn reader_statistics(&self) -> ReaderStatistics
Returns cumulative payload-reader counters shared by all volumes.
Sourcepub fn reader_cache_info(&self) -> ReaderCacheInfo
pub fn reader_cache_info(&self) -> ReaderCacheInfo
Returns shared automatic decoded payload-cache usage.
Sourcepub fn size(&mut self, id: &str) -> Result<u64>
pub fn size(&mut self, id: &str) -> Result<u64>
Logical size of a selected primary image, after dependency validation.
Sourcepub fn read_at(
&mut self,
id: &str,
buffer: &mut [u8],
offset: u64,
) -> Result<usize>
pub fn read_at( &mut self, id: &str, buffer: &mut [u8], offset: u64, ) -> Result<usize>
Reads assembled image bytes using the primary Map and explicit owners. Unknown/unreadable symbolic data and missing companions fail closed.
Sourcepub fn verify_image(
&mut self,
id: &str,
expected_sha256: Option<&str>,
progress: impl FnMut(u64, u64) -> ControlFlow<()>,
) -> Result<SetDigest>
pub fn verify_image( &mut self, id: &str, expected_sha256: Option<&str>, progress: impl FnMut(u64, u64) -> ControlFlow<()>, ) -> Result<SetDigest>
Computes whole-image SHA256 across companions. This does not certify the per-volume metadata or striped composite hashes. Optional external digest must cover the assembled image, not information.turtle or a ZIP file.
Auto Trait Implementations§
impl Freeze for VolumeSet
impl RefUnwindSafe for VolumeSet
impl Send for VolumeSet
impl Sync for VolumeSet
impl Unpin for VolumeSet
impl UnsafeUnpin for VolumeSet
impl UnwindSafe for VolumeSet
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more