pub struct CardRewritePlan {
pub header: Header,
pub copies: Vec<(u64, u64)>,
pub copies_before_card: usize,
pub card_offset: u64,
pub new_len: u64,
}Expand description
What a card rewrite does to a file’s layout.
Fields§
§header: HeaderThe new header: every section offset fixed, metadata and build info at
their new lengths. The content hash is still the old one —
rewrite_card writes the new one once it has folded it.
copies: Vec<(u64, u64)>The sections of the old file copied verbatim, as (old offset, length), in file order — every section the header points at except
the card and the build record. They are written back to back, so bytes
no section points at (a card an in-place re-card left behind, say) are
not copied.
copies_before_card: usizeHow many of copies come before the new card: the new
card and build record take the old ones’ place in the file order —
first on every file the in-RAM writers produce, last on one whose card
was placed after the data.
card_offset: u64Where the new metadata section starts (build info follows it).
new_len: u64The rewritten file’s length, footer included.
Trait Implementations§
Source§impl Clone for CardRewritePlan
impl Clone for CardRewritePlan
Source§fn clone(&self) -> CardRewritePlan
fn clone(&self) -> CardRewritePlan
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more