Struct rdiff::Diff
[−]
[src]
pub struct Diff { // some fields omitted }
Represents a series of operations that were performed on a file to transform it into a new version.
The operations are stored in file order, which means that every operation that affects an earlier part of the file must be stored before an operation that affects a later part. The diff also assumes that insert operations are performed prior to delete operations.
Methods
impl Diff
[src]
fn new() -> Diff
Creates a new Diff
fn inserts(&self) -> Iter<Insert>
Gets an iterator over all insert operations
fn deletes(&self) -> Iter<Delete>
Gets an iterator over all delete operations
fn apply_to_string(&self, string: &str) -> Result<String, FromUtf8Error>
Applies all of the operations in the diff to the given string. Gives an error if the resulting string can't be represented by ut8.
Panics
When the operations refer to positions that are not represented by the string.
Trait Implementations
Derived Implementations
impl PartialEq for Diff
[src]
fn eq(&self, __arg_0: &Diff) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Diff) -> bool
This method tests for !=
.