pub struct CardAppendPlan {
pub header: Header,
pub card_offset: u64,
pub old_len: u64,
pub dead_bytes: u64,
pub old_head: Vec<u8>,
}Expand description
What placing a new card after a file’s data does to its layout — see “The card after the data” in the module docs.
Fields§
§header: HeaderThe new header: the metadata section at card_offset,
no build-info section yet (its length is only known when the record is
sealed, after the hash — commit_card_append fills it), every other
section where it was, and still the old content hash.
card_offset: u64Where the new card starts: the file’s end as its header records it (in place — past the old footer, so the old file stays whole), or the old footer itself (a fresh file nobody has read yet, so no gap).
old_len: u64The file’s length as its own header records it
(Header::expected_file_len).
dead_bytes: u64The bytes no section points at once the plan is committed: the old card and build record, and — in place — the old 4-byte footer.
old_head: Vec<u8>The header bytes the plan was made from. commit_card_append
refuses a file whose header no longer reads exactly this.
Trait Implementations§
Source§impl Clone for CardAppendPlan
impl Clone for CardAppendPlan
Source§impl Debug for CardAppendPlan
impl Debug for CardAppendPlan
impl Eq for CardAppendPlan
Source§impl PartialEq for CardAppendPlan
impl PartialEq for CardAppendPlan
impl StructuralPartialEq for CardAppendPlan
Auto Trait Implementations§
impl Freeze for CardAppendPlan
impl RefUnwindSafe for CardAppendPlan
impl Send for CardAppendPlan
impl Sync for CardAppendPlan
impl Unpin for CardAppendPlan
impl UnsafeUnpin for CardAppendPlan
impl UnwindSafe for CardAppendPlan
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