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§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
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more