pub struct ChunkSet {
pub chunks: [ChunkInfo; 16],
pub count: usize,
pub total_size: u64,
pub bytes_written: u64,
}Expand description
Collection of chunks for a single ISO
Fields§
§chunks: [ChunkInfo; 16]Array of chunk info (fixed size, use count for valid entries)
count: usizeNumber of valid chunks in the array
total_size: u64Total ISO size in bytes
bytes_written: u64Bytes written so far (for progress tracking)
Implementations§
Source§impl ChunkSet
impl ChunkSet
Sourcepub fn add_chunk(&mut self, info: ChunkInfo) -> Option<usize>
pub fn add_chunk(&mut self, info: ChunkInfo) -> Option<usize>
Add a chunk to the set
Returns the chunk index on success, or None if set is full
Sourcepub fn chunk_for_offset(&self, offset: u64) -> Option<(usize, u64)>
pub fn chunk_for_offset(&self, offset: u64) -> Option<(usize, u64)>
Find chunk containing a given byte offset
Sourcepub fn total_capacity(&self) -> u64
pub fn total_capacity(&self) -> u64
Calculate total capacity of all chunks
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if all chunks have been written
Sourcepub fn progress_percent(&self) -> u8
pub fn progress_percent(&self) -> u8
Get write progress as percentage (0-100)
Sourcepub fn iter(&self) -> ChunkIterator<'_> ⓘ
pub fn iter(&self) -> ChunkIterator<'_> ⓘ
Iterator over valid chunks
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ChunkSet
impl RefUnwindSafe for ChunkSet
impl Send for ChunkSet
impl Sync for ChunkSet
impl Unpin for ChunkSet
impl UnwindSafe for ChunkSet
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
Mutably borrows from an owned value. Read more