Struct rdiff::Diff [] [src]

pub struct Diff { /* 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]

Creates a new Diff

Gets an iterator over all insert operations

Gets an iterator over all delete operations

Checks if this set of diffs has any actual content

Applies all of the operations in the diff to the given string. Gives an error if the resulting string can't be represented by utf8.

Panics

When the operations refer to positions that are not represented by the string.

Apply the operations in this sequence to a file. This should not be called until after the sequence has been integrated via Engine::integrate_remote The file must have been opened on both read and write mode (see OpenOptions).

Compress this diff and write to writer. The output can then be expanded back into an equivilent Diff using expand_from()

Expand this diff from previously compressed data in reader. The data in reader should have been written using compress_to()

Trait Implementations

impl Debug for Diff
[src]

Formats the value using the given formatter.

impl PartialEq for Diff
[src]

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

This method tests for !=.