Struct librsync::Delta [] [src]

pub struct Delta<R> { /* fields omitted */ }

A struct to generate a delta between two files.

This type takes two Read streams, one for the signature of the base file and one for the new file. It then provides another Read stream from which get the result.

Methods

impl<R: Read> Delta<BufReader<R>>
[src]

Creates a new delta stream.

This constructor takes two Read streams for the new file (new parameter) and for the signatures of the base file (base_sig parameter). It produces a delta stream from which read the resulting delta file.

impl<R: BufRead> Delta<R>
[src]

Creates a new delta stream by using a BufRead as new file.

This constructor specializes the new constructor by taking a BufRead instance as new parameter. Prefer this constructor if you already have a BufRead as input stream, since it avoids wrapping the input stream into another BufRead instance. See new constructor for more details on the parameters.

Unwraps this stream, returning the underlying new file stream.

Trait Implementations

impl<R: BufRead> Read for Delta<R>
[src]

Pull some bytes from this source into the specified buffer, returning how many bytes were read. Read more

Read all bytes until EOF in this source, placing them into buf. Read more

Read all bytes until EOF in this source, placing them into buf. Read more

Read the exact number of bytes required to fill buf. Read more

Creates a "by reference" adaptor for this instance of Read. Read more

Transforms this Read instance to an Iterator over its bytes. Read more

🔬 This is a nightly-only experimental API. (io)

the semantics of a partial read/write of where errors happen is currently unclear and may change

Transforms this Read instance to an Iterator over chars. Read more

Creates an adaptor which will chain this stream with another. Read more

Creates an adaptor which will read at most limit bytes from it. Read more