pub struct DiffBlock {
pub path: String,
pub hunks: Vec<DiffHunk>,
}Expand description
DIFF block — represents code changes for a single file.
Used to compactly represent modifications (e.g. from a git diff or an edit operation). Each hunk captures a contiguous range of changes in unified diff format.
Field layout within body:
┌──────────┬───────────┬───────┬───────────────────────────────┐
│ Field ID │ Wire Type │ Name │ Description │
├──────────┼───────────┼───────┼───────────────────────────────┤
│ 1 │ Bytes │ path │ File path │
│ 2 │ Nested │ hunks │ Repeated DiffHunk │
└──────────┴───────────┴───────┴───────────────────────────────┘Multiple hunks produce multiple field-2 occurrences (repeated field
pattern, same as FileEntry in FILE_TREE).
Fields§
§path: String§hunks: Vec<DiffHunk>Implementations§
Trait Implementations§
impl Eq for DiffBlock
impl StructuralPartialEq for DiffBlock
Auto Trait Implementations§
impl Freeze for DiffBlock
impl RefUnwindSafe for DiffBlock
impl Send for DiffBlock
impl Sync for DiffBlock
impl Unpin for DiffBlock
impl UnsafeUnpin for DiffBlock
impl UnwindSafe for DiffBlock
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