svn_patch_t

Struct svn_patch_t 

Source
#[repr(C)]
pub struct svn_patch_t {
Show 13 fields pub old_filename: *const c_char, pub new_filename: *const c_char, pub hunks: *mut apr_array_header_t, pub prop_patches: *mut apr_hash_t, pub operation: svn_diff_operation_kind_t, pub reverse: svn_boolean_t, pub mergeinfo: svn_mergeinfo_t, pub reverse_mergeinfo: svn_mergeinfo_t, pub binary_patch: *mut svn_diff_binary_patch_t, pub old_executable_bit: svn_tristate_t, pub new_executable_bit: svn_tristate_t, pub old_symlink_bit: svn_tristate_t, pub new_symlink_bit: svn_tristate_t,
}
Expand description

Data type to manage parsing of patches.

Represents a patch to one target file.

API users should not allocate structures of this type directly.

@since New in 1.7.

Fields§

§old_filename: *const c_char

The old and new file names as retrieved from the patch file. These paths are UTF-8 encoded and canonicalized, but otherwise left unchanged from how they appeared in the patch file.

§new_filename: *const c_char§hunks: *mut apr_array_header_t

An array containing an svn_diff_hunk_t * for each hunk parsed from the patch.

§prop_patches: *mut apr_hash_t

A hash table keyed by property names containing svn_prop_patch_t object for each property parsed from the patch.

§operation: svn_diff_operation_kind_t

Represents the operation performed on the file.

§reverse: svn_boolean_t

Indicates whether the patch is being interpreted in reverse.

§If so, how does this affect the interpretation of other fields?
§mergeinfo: svn_mergeinfo_t

Mergeinfo parsed from svn:mergeinfo diff data, with one entry for forward merges and one for reverse merges. Either entry can be @c NULL if no such merges are part of the diff. @since New in 1.9.

§reverse_mergeinfo: svn_mergeinfo_t§binary_patch: *mut svn_diff_binary_patch_t

Declares that there is a binary conflict and contains the information to apply it as parsed from the file. @since New in 1.10.

§old_executable_bit: svn_tristate_t

The old and new executability bits, as retrieved from the patch file, from the git-like mode headers.

A patch may specify an executability change via @a old_executable_bit and @a new_executable_bit, via a #SVN_PROP_EXECUTABLE propchange hunk, or both ways. It is upto caller how to decide how conflicting information is handled.

#svn_tristate_unknown indicates the patch does not specify the corresponding bit.

@since New in 1.10.

§new_executable_bit: svn_tristate_t§old_symlink_bit: svn_tristate_t

The old and new symlink bits, as retrieved from the patch file, from the git-like mode headers.

A patch may specify a symlink change via @a old_symlink_bit and @a new_symlink_bit, via a #SVN_PROP_SPECIAL propchange hunk, or both ways. It is upto caller how to decide how conflicting information is handled. Most implementations will currently just describe a replacement of the file though.

#svn_tristate_unknown indicates the patch does not specify the corresponding bit.

@since New in 1.10.

§new_symlink_bit: svn_tristate_t

Trait Implementations§

Source§

impl Clone for svn_patch_t

Source§

fn clone(&self) -> svn_patch_t

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for svn_patch_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for svn_patch_t

Source§

fn default() -> Self

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

impl Copy for svn_patch_t

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.