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§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
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> ⓘ
Converts
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> ⓘ
Converts
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