[−][src]Struct librsync::Delta
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]
pub fn new<S: Read + ?Sized>(new: R, base_sig: &mut S) -> Result<Self>
[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]
pub fn with_buf_read<S: Read + ?Sized>(new: R, base_sig: &mut S) -> Result<Self>
[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.
pub fn into_inner(self) -> R
[src]
Unwraps this stream, returning the underlying new file stream.
Trait Implementations
impl<R: BufRead> Read for Delta<R>
[src]
fn read(&mut self, buf: &mut [u8]) -> Result<usize>
[src]
fn read_vectored(&mut self, bufs: &mut [IoSliceMut]) -> Result<usize, Error>
1.36.0[src]
unsafe fn initializer(&self) -> Initializer
[src]
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>
1.0.0[src]
fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
1.0.0[src]
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
1.6.0[src]
fn by_ref(&mut self) -> &mut Self
1.0.0[src]
fn bytes(self) -> Bytes<Self>
1.0.0[src]
fn chain<R>(self, next: R) -> Chain<Self, R> where
R: Read,
1.0.0[src]
R: Read,
fn take(self, limit: u64) -> Take<Self>
1.0.0[src]
Auto Trait Implementations
impl<R> RefUnwindSafe for Delta<R> where
R: RefUnwindSafe,
R: RefUnwindSafe,
impl<R> Send for Delta<R> where
R: Send,
R: Send,
impl<R> !Sync for Delta<R>
impl<R> Unpin for Delta<R> where
R: Unpin,
R: Unpin,
impl<R> UnwindSafe for Delta<R> where
R: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,