svn_txdelta_window_t

Struct svn_txdelta_window_t 

Source
#[repr(C)]
pub struct svn_txdelta_window_t { pub sview_offset: svn_filesize_t, pub sview_len: apr_size_t, pub tview_len: apr_size_t, pub num_ops: c_int, pub src_ops: c_int, pub ops: *const svn_txdelta_op_t, pub new_data: *const svn_string_t, }
Expand description

An #svn_txdelta_window_t object describes how to reconstruct a contiguous section of the target string (the “target view”) using a specified contiguous region of the source string (the “source view”). It contains a series of instructions which assemble the new target string text by pulling together substrings from:

  • the source view,

  • the previously constructed portion of the target view,

  • a string of new data contained within the window structure

The source view must always slide forward from one window to the next; that is, neither the beginning nor the end of the source view may move to the left as we read from a window stream. This property allows us to apply deltas to non-seekable source streams without making a full copy of the source stream.

Fields§

§sview_offset: svn_filesize_t

The offset of the source view for this window.

§sview_len: apr_size_t

The length of the source view for this window.

§tview_len: apr_size_t

The length of the target view for this window, i.e. the number of bytes which will be reconstructed by the instruction stream.

§num_ops: c_int

The number of instructions in this window.

§src_ops: c_int

The number of svn_txdelta_source instructions in this window. If this number is 0, we don’t need to read the source in order to reconstruct the target view.

§ops: *const svn_txdelta_op_t

The instructions for this window.

§new_data: *const svn_string_t

New data, for use by any `svn_txdelta_new’ instructions.

Trait Implementations§

Source§

impl Default for svn_txdelta_window_t

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.