Struct unidiff::Line [] [src]

pub struct Line {
    pub source_line_no: Option<usize>,
    pub target_line_no: Option<usize>,
    pub diff_line_no: usize,
    pub line_type: String,
    pub value: String,
}

A diff line

Fields

source_line_no: Option<usize>

Source file line number

target_line_no: Option<usize>

Target file line number

diff_line_no: usize

Diff file line number

line_type: String

Diff line type

value: String

Diff line content value

Methods

impl Line
[src]

fn new<T: Into<String>>(value: T, line_type: T) -> Line

fn is_added(&self) -> bool

Diff line type is added

fn is_removed(&self) -> bool

Diff line type is removed

fn is_context(&self) -> bool

Diff line type is context

Trait Implementations

impl Hash for Line
[src]

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

Feeds this value into the state given, updating the hasher as necessary.

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0

Feeds a slice of this type into the state provided.

impl Eq for Line
[src]

impl PartialEq for Line
[src]

fn eq(&self, __arg_0: &Line) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Line) -> bool

This method tests for !=.

impl Clone for Line
[src]

fn clone(&self) -> Line

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Debug for Line
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Display for Line
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.