pub struct Row {
pub kind: Kind,
pub old: Option<u32>,
pub new: Option<u32>,
pub text: String,
}Expand description
One row, with the line numbers it has on each side.
old is the line in the file before the edit, new the line after it; an added row has no
old and a removed row has no new. Numbers start at 1, as a person counts lines, and a
hunk against an empty file legitimately starts the old side at 0 — there is no first line of a
file that has none.
Fields§
§kind: Kind§old: Option<u32>§new: Option<u32>§text: StringTrait Implementations§
Source§impl<'de> Deserialize<'de> for Row
impl<'de> Deserialize<'de> for Row
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 Eq for Row
impl StructuralPartialEq for Row
Auto Trait Implementations§
impl Forget for Row
impl Freeze for Row
impl Move for Row
impl RefUnwindSafe for Row
impl Send for Rowwhere
RawVecInner: Send,
impl Sync for Rowwhere
RawVecInner: Sync,
impl Unpin for Row
impl UnsafeUnpin for Row
impl UnwindSafe for Rowwhere
RawVecInner: UnwindSafe,
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
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
Compare self to
key and return true if they are equal.