Struct unidiff::PatchSet [] [src]

pub struct PatchSet { /* fields omitted */ }

Unfied patchset

You can iterate over it to get PatchedFiles.

let mut patch = PatchSet::new();
patch.parse("some diff");
for patched_file in patch {
  // do something with patched_file
  for hunk in patched_file {
      // do something with hunk
      for line in hunk {
          // do something with line
      }
  }
}

Methods

impl PatchSet
[src]

Added files vector

Removed files vector

Modified files vector

Initialize a new PatchSet instance

Initialize a new PatchedSet instance with encoding

Initialize a new PatchedSet instance with encoding(string form)

Parse diff from bytes

Parse diff from string

Count of patched files

Trait Implementations

impl Clone for PatchSet
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Default for PatchSet
[src]

Returns the "default value" for a type. Read more

impl Debug for PatchSet
[src]

Formats the value using the given formatter.

impl Display for PatchSet
[src]

Formats the value using the given formatter. Read more

impl IntoIterator for PatchSet
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl Index<usize> for PatchSet
[src]

The returned type after indexing

The method for the indexing (container[index]) operation

impl IndexMut<usize> for PatchSet
[src]

The method for the mutable indexing (container[index]) operation