pub struct CardAppendPlan {
pub header: Header,
pub card_offset: u64,
pub old_len: u64,
pub dead_bytes: u64,
pub old_head: Vec<u8>,
}Expand description
What placing a new card after a file’s data does to its layout — see “The card after the data” in the module docs.
Fields§
§header: HeaderThe new header: the metadata section at card_offset,
no build-info section yet (its length is only known when the record is
sealed, after the hash — commit_card_append fills it), every other
section where it was, and still the old content hash.
card_offset: u64Where the new card starts: the file’s end as its header records it (in place — past the old footer, so the old file stays whole), or the old footer itself (a fresh file nobody has read yet, so no gap).
old_len: u64The file’s length as its own header records it
(Header::expected_file_len).
dead_bytes: u64The bytes no section points at once the plan is committed: the old card and build record, and — in place — the old 4-byte footer.
old_head: Vec<u8>The header bytes the plan was made from. commit_card_append
refuses a file whose header no longer reads exactly this.
Trait Implementations§
Source§impl Clone for CardAppendPlan
impl Clone for CardAppendPlan
Source§fn clone(&self) -> CardAppendPlan
fn clone(&self) -> CardAppendPlan
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more