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 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 Forget for CardRewritePlan
impl Freeze for CardRewritePlan
impl Move 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.