pub struct HunkEntry {
pub id: String,
pub file: String,
pub old_start: u32,
pub old_count: u32,
pub new_start: u32,
pub new_count: u32,
pub class: String,
pub digest: String,
pub nonl_old: bool,
pub nonl_new: bool,
pub forge_position: ForgePosition,
}Expand description
One canonical hunk from git diff -U0 --no-renames. Ids are positional
(h0..hN in enumeration order) and do NOT survive regeneration; digest does.
Fields§
§id: String§file: String§old_start: u32§old_count: u32§new_start: u32§new_count: u32§class: StringShape class id into classes.
digest: StringExact content hash of the hunk (removed ++ added bytes, un-normalised). The stable anchor for comments and review state across regenerations.
nonl_old: bool\ No newline at end of file on the old side.
nonl_new: bool\ No newline at end of file on the new side.
forge_position: ForgePositionThe hunk’s first line on each side, in the canonical --no-renames view. Not a
posting anchor: the forge consumer places a finding by its own anchor and the
file’s old_path (spec/json-contract.md).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HunkEntry
impl<'de> Deserialize<'de> for HunkEntry
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>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for HunkEntry
Auto Trait Implementations§
impl Freeze for HunkEntry
impl RefUnwindSafe for HunkEntry
impl Send for HunkEntry
impl Sync for HunkEntry
impl Unpin for HunkEntry
impl UnsafeUnpin for HunkEntry
impl UnwindSafe for HunkEntry
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