pub struct CardRewritePlan {
pub header: Header,
pub before: (u64, u64),
pub after: (u64, u64),
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.
before: (u64, u64)The span of the old file copied verbatim before the new card,
[HEADER_LEN, card_start) — empty on every file the writers produce;
non-empty when a section was laid out ahead of the card.
after: (u64, u64)The span of the old file copied verbatim after the new card,
[card_end, file_len).
card_offset: u64Where the new metadata section starts (build info follows it).
new_len: u64The rewritten file’s length.
Trait Implementations§
Source§impl Clone for CardRewritePlan
impl Clone for CardRewritePlan
Source§fn clone(&self) -> CardRewritePlan
fn clone(&self) -> CardRewritePlan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CardRewritePlan
impl Debug for CardRewritePlan
impl Eq for CardRewritePlan
Source§impl PartialEq for CardRewritePlan
impl PartialEq for CardRewritePlan
impl StructuralPartialEq for CardRewritePlan
Auto Trait Implementations§
impl Freeze for CardRewritePlan
impl RefUnwindSafe for CardRewritePlan
impl Send for CardRewritePlan
impl Sync for CardRewritePlan
impl Unpin for CardRewritePlan
impl UnsafeUnpin for CardRewritePlan
impl UnwindSafe for CardRewritePlan
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