Struct unidiff::PatchSet [] [src]

pub struct PatchSet { /* fields omitted */ }

Unfied patchset

You can iterate over it to get PatchedFiles.

This example is not tested
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]

Important traits for Vec<u8>
[src]

Added files vector

Important traits for Vec<u8>
[src]

Removed files vector

Important traits for Vec<u8>
[src]

Modified files vector

[src]

Initialize a new PatchSet instance

[src]

Initialize a new PatchedSet instance with encoding

[src]

Initialize a new PatchedSet instance with encoding(string form)

[src]

Parse diff from bytes

[src]

Parse diff from string

[src]

Count of patched files

[src]

Trait Implementations

impl Clone for PatchSet
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Default for PatchSet
[src]

[src]

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

impl Debug for PatchSet
[src]

[src]

Formats the value using the given formatter. Read more

impl Display for PatchSet
[src]

[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?

[src]

Creates an iterator from a value. Read more

impl Index<usize> for PatchSet
[src]

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl IndexMut<usize> for PatchSet
[src]

[src]

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

Auto Trait Implementations

impl Send for PatchSet

impl Sync for PatchSet