pub struct Hunk {
pub start: usize,
pub end: usize,
pub text: String,
pub state: HunkState,
}Expand description
One contiguous change the human accepts or rejects on its own.
start..end is a char range in the document the proposal was authored against;
text replaces it. A pure insertion has start == end, a pure deletion has empty
text — the two cases ARCHITECTURE.md §9.3’s “file/range edits” glossed over.
Fields§
§start: usize§end: usize§text: String§state: HunkStateImplementations§
Trait Implementations§
impl Eq for Hunk
impl StructuralPartialEq for Hunk
Auto Trait Implementations§
impl Freeze for Hunk
impl RefUnwindSafe for Hunk
impl Send for Hunk
impl Sync for Hunk
impl Unpin for Hunk
impl UnsafeUnpin for Hunk
impl UnwindSafe for Hunk
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