pub struct IsoManifest {
pub name: [u8; 64],
pub name_len: usize,
pub total_size: u64,
pub sha256: [u8; 32],
pub chunks: ChunkSet,
pub flags: u8,
}Expand description
ISO manifest structure
Fields§
§name: [u8; 64]ISO filename (null-terminated within buffer)
name_len: usizeName length (excluding null terminator)
total_size: u64Total ISO size in bytes
sha256: [u8; 32]SHA256 hash (zeros if not set)
chunks: ChunkSetChunk information
flags: u8Flags (complete, verified)
Implementations§
Source§impl IsoManifest
impl IsoManifest
Sourcepub fn set_sha256(&mut self, hash: &[u8; 32])
pub fn set_sha256(&mut self, hash: &[u8; 32])
Set the SHA256 hash
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if manifest is marked complete
Sourcepub fn mark_complete(&mut self)
pub fn mark_complete(&mut self)
Mark manifest as complete
Sourcepub fn is_verified(&self) -> bool
pub fn is_verified(&self) -> bool
Check if SHA256 has been verified
Sourcepub fn mark_verified(&mut self)
pub fn mark_verified(&mut self)
Mark SHA256 as verified
Sourcepub fn add_chunk(
&mut self,
partition_uuid: [u8; 16],
start_lba: u64,
end_lba: u64,
) -> Result<usize, IsoError>
pub fn add_chunk( &mut self, partition_uuid: [u8; 16], start_lba: u64, end_lba: u64, ) -> Result<usize, IsoError>
Add a chunk partition to the manifest
Sourcepub fn serialized_size(&self) -> usize
pub fn serialized_size(&self) -> usize
Calculate required manifest size
Sourcepub fn serialize(&self, buffer: &mut [u8]) -> Result<usize, IsoError>
pub fn serialize(&self, buffer: &mut [u8]) -> Result<usize, IsoError>
Serialize manifest to a buffer
Buffer must be at least serialized_size() bytes
Sourcepub fn deserialize(buffer: &[u8]) -> Result<Self, IsoError>
pub fn deserialize(buffer: &[u8]) -> Result<Self, IsoError>
Deserialize manifest from a buffer
Trait Implementations§
Source§impl Clone for IsoManifest
impl Clone for IsoManifest
Source§fn clone(&self) -> IsoManifest
fn clone(&self) -> IsoManifest
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for IsoManifest
impl RefUnwindSafe for IsoManifest
impl Send for IsoManifest
impl Sync for IsoManifest
impl Unpin for IsoManifest
impl UnwindSafe for IsoManifest
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