#[repr(C)]pub struct svn_diff_fns2_t {
pub datasources_open: Option<unsafe extern "C" fn(diff_baton: *mut c_void, prefix_lines: *mut apr_off_t, suffix_lines: *mut apr_off_t, datasources: *const svn_diff_datasource_e, datasources_len: apr_size_t) -> *mut svn_error_t>,
pub datasource_close: Option<unsafe extern "C" fn(diff_baton: *mut c_void, datasource: svn_diff_datasource_e) -> *mut svn_error_t>,
pub datasource_get_next_token: Option<unsafe extern "C" fn(hash: *mut apr_uint32_t, token: *mut *mut c_void, diff_baton: *mut c_void, datasource: svn_diff_datasource_e) -> *mut svn_error_t>,
pub token_compare: Option<unsafe extern "C" fn(diff_baton: *mut c_void, ltoken: *mut c_void, rtoken: *mut c_void, compare: *mut c_int) -> *mut svn_error_t>,
pub token_discard: Option<unsafe extern "C" fn(diff_baton: *mut c_void, token: *mut c_void)>,
pub token_discard_all: Option<unsafe extern "C" fn(diff_baton: *mut c_void)>,
}
Expand description
A vtable for reading data from the three datasources. @since New in 1.7.
Fields§
§datasources_open: Option<unsafe extern "C" fn(diff_baton: *mut c_void, prefix_lines: *mut apr_off_t, suffix_lines: *mut apr_off_t, datasources: *const svn_diff_datasource_e, datasources_len: apr_size_t) -> *mut svn_error_t>
Open the datasources of type @a datasources.
datasource_close: Option<unsafe extern "C" fn(diff_baton: *mut c_void, datasource: svn_diff_datasource_e) -> *mut svn_error_t>
Close the datasource of type @a datasource.
datasource_get_next_token: Option<unsafe extern "C" fn(hash: *mut apr_uint32_t, token: *mut *mut c_void, diff_baton: *mut c_void, datasource: svn_diff_datasource_e) -> *mut svn_error_t>
Get the next “token” from the datasource of type @a datasource. Return a “token” in @a *token. Return a hash of “token” in @a *hash. Leave @a token and @a hash untouched when the datasource is exhausted.
token_compare: Option<unsafe extern "C" fn(diff_baton: *mut c_void, ltoken: *mut c_void, rtoken: *mut c_void, compare: *mut c_int) -> *mut svn_error_t>
A function for ordering the tokens, resembling ‘strcmp’ in functionality. @a compare should contain the return value of the comparison: If @a ltoken and @a rtoken are “equal”, return 0. If @a ltoken is “less than” @a rtoken, return a number < 0. If @a ltoken is “greater than” @a rtoken, return a number > 0.
token_discard: Option<unsafe extern "C" fn(diff_baton: *mut c_void, token: *mut c_void)>
Free @a token from memory, the diff algorithm is done with it.
token_discard_all: Option<unsafe extern "C" fn(diff_baton: *mut c_void)>
Free all tokens from memory, they’re no longer needed.
Trait Implementations§
Source§impl Clone for svn_diff_fns2_t
impl Clone for svn_diff_fns2_t
Source§fn clone(&self) -> svn_diff_fns2_t
fn clone(&self) -> svn_diff_fns2_t
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more