[][src]Enum fast_rsync::ApplyError

pub enum ApplyError {
    WrongMagic {
        magic: u32,
    },
    UnexpectedEof {
        reading: &'static str,
        expected: usize,
        available: usize,
    },
    OutputLimit {
        what: &'static str,
        wanted: usize,
        available: usize,
    },
    CopyOutOfBounds {
        offset: u64,
        len: u64,
        data_len: usize,
    },
    CopyZero,
    UnknownCommand {
        command: u8,
    },
    TrailingData {
        length: usize,
    },
}

Indicates that a delta could not be applied because it was invalid.

Variants

WrongMagic

The delta started with the wrong magic, perhaps because it is not really an rsync delta.

Fields of WrongMagic

magic: u32

The magic number encountered.

UnexpectedEof

The delta ended unexpectedly, perhaps because it was truncated.

Fields of UnexpectedEof

reading: &'static str

The item being read.

expected: usize

The expected length of that item.

available: usize

The remaining length of the input.

OutputLimit

The resulting data would have exceeded the output limit given to apply_limited().

Fields of OutputLimit

what: &'static str

The item being written.

wanted: usize

The length of that item.

available: usize

The remaining output limit.

CopyOutOfBounds

The delta contained an out-of-bounds reference to the base data: that is, offset + len > data_len.

Fields of CopyOutOfBounds

offset: u64

The copy offset.

len: u64

The copy length.

data_len: usize

The length of the base data.

CopyZero

The delta contained a zero-length copy command.

UnknownCommand

The delta contained an unrecognized command.

Fields of UnknownCommand

command: u8

The command byte encountered.

TrailingData

The delta contained data after its end command.

Fields of TrailingData

length: usize

The length of the trailing data.

Trait Implementations

impl Clone for ApplyError[src]

impl Copy for ApplyError[src]

impl Debug for ApplyError[src]

impl Display for ApplyError[src]

impl Error for ApplyError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> Cast<U> for T where
    U: FromCast<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> FromCast<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.