pub struct DiffLine {
pub id: RowId,
pub kind: DiffLineKind,
pub text: String,
}Expand description
A single line in a unified diff hunk.
Fields§
§id: RowIdStable row identifier.
kind: DiffLineKindLine role inside the hunk.
text: StringLine text without the leading diff marker.
Trait Implementations§
Source§impl Decode for DiffLine
impl Decode for DiffLine
Source§fn decode(input: &mut impl BufRead) -> Result<Self, DecodeError>
fn decode(input: &mut impl BufRead) -> Result<Self, DecodeError>
Reads one hunk-body line from the input stream.
The returned DiffLine uses a zero row id; callers should
assign a stable ID.
Source§fn try_decode(input: &mut impl BufRead) -> Result<Option<Self>, DecodeError>
fn try_decode(input: &mut impl BufRead) -> Result<Option<Self>, DecodeError>
Reads and decodes a value, returning
Ok(None) at clean end-of-input.
Anything else, including a partial value followed by EOF surfaces as
Err.Source§fn decode_str(input: &str) -> Result<Self, DecodeError>
fn decode_str(input: &str) -> Result<Self, DecodeError>
Decodes a value from a UTF-8 string.
Source§fn decode_bytes(input: &[u8]) -> Result<Self, DecodeError>
fn decode_bytes(input: &[u8]) -> Result<Self, DecodeError>
Decodes a value from raw UTF-8 bytes.
impl Eq for DiffLine
impl StructuralPartialEq for DiffLine
Auto Trait Implementations§
impl Freeze for DiffLine
impl RefUnwindSafe for DiffLine
impl Send for DiffLine
impl Sync for DiffLine
impl Unpin for DiffLine
impl UnsafeUnpin for DiffLine
impl UnwindSafe for DiffLine
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