Struct unidiff::Hunk [] [src]

pub struct Hunk {
    pub source_start: usize,
    pub source_length: usize,
    pub target_start: usize,
    pub target_length: usize,
    pub section_header: String,
    // some fields omitted
}

Each of the modified blocks of a file

You can iterate over it to get Lines.

Fields

Source file starting line number

Source file changes length

Target file starting line number

Target file changes length

Section header

Methods

impl Hunk
[src]

[src]

[src]

Count of lines added

[src]

Count of lines removed

[src]

Is this hunk valid

Important traits for Vec<u8>
[src]

Lines from source file

Important traits for Vec<u8>
[src]

Lines from target file

[src]

Append new line into hunk

[src]

Count of lines in this hunk

[src]

Is this hunk empty

Trait Implementations

impl Debug for Hunk
[src]

[src]

Formats the value using the given formatter. Read more

impl Clone for Hunk
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for Hunk
[src]

[src]

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

[src]

This method tests for !=.

impl Eq for Hunk
[src]

impl Hash for Hunk
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Display for Hunk
[src]

[src]

Formats the value using the given formatter. Read more

impl IntoIterator for Hunk
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more

impl Index<usize> for Hunk
[src]

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl IndexMut<usize> for Hunk
[src]

[src]

Performs the mutable indexing (container[index]) operation.

Auto Trait Implementations

impl Send for Hunk

impl Sync for Hunk