pub struct StageDelta {
pub base_stage_id: String,
pub chain_length: usize,
pub common_prefix: usize,
pub common_suffix: usize,
pub middle_hex: String,
}Expand description
On-disk format of a delta-encoded stage.
File path: <sig>/implementations/<stage_id>.delta.json.
The pair (common_prefix, common_suffix) must satisfy
prefix + suffix <= base_bytes.len() — they describe a
non-overlapping splice into the base.
Fields§
§base_stage_id: Stringstage_id of the previous stage these bytes are diff’d
against. Either holds full bytes (.ast.json) or its own
delta — reconstruction recurses.
chain_length: usizeLength of the chain ending at this stage. A delta against
a full snapshot has chain_length: 1; chained deltas
increment from there.
common_prefix: usizeNumber of bytes shared at the start with base.
common_suffix: usizeNumber of bytes shared at the end with base.
middle_hex: StringLowercase-hex of the replacement bytes for the middle. Empty hex string means “delete the middle, splice prefix directly to suffix” — happens when the new bytes are a pure deletion against the base.
Trait Implementations§
Source§impl Clone for StageDelta
impl Clone for StageDelta
Source§fn clone(&self) -> StageDelta
fn clone(&self) -> StageDelta
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 StageDelta
impl Debug for StageDelta
Source§impl<'de> Deserialize<'de> for StageDelta
impl<'de> Deserialize<'de> for StageDelta
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for StageDelta
Source§impl PartialEq for StageDelta
impl PartialEq for StageDelta
Source§impl Serialize for StageDelta
impl Serialize for StageDelta
impl StructuralPartialEq for StageDelta
Auto Trait Implementations§
impl Freeze for StageDelta
impl RefUnwindSafe for StageDelta
impl Send for StageDelta
impl Sync for StageDelta
impl Unpin for StageDelta
impl UnsafeUnpin for StageDelta
impl UnwindSafe for StageDelta
Blanket Implementations§
impl<T> Allocation for T
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.