Struct crfsuite_sys::tag_crfsuite_params
[−]
[src]
#[repr(C)]pub struct tag_crfsuite_params { pub internal: *mut c_void, pub nref: c_int, pub addref: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t) -> c_int>, pub release: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t) -> c_int>, pub num: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t) -> c_int>, pub name: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: c_int, _: *mut *mut c_char) -> c_int>, pub set: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: *const c_char) -> c_int>, pub get: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: *mut *mut c_char) -> c_int>, pub set_int: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: c_int) -> c_int>, pub set_float: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: floatval_t) -> c_int>, pub set_string: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: *const c_char) -> c_int>, pub get_int: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: *mut c_int) -> c_int>, pub get_float: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: *mut floatval_t) -> c_int>, pub get_string: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: *mut *mut c_char) -> c_int>, pub help: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: *mut *mut c_char, _: *mut *mut c_char) -> c_int>, pub free: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char)>, }
CRFSuite parameter interface.
Fields
internal: *mut c_void
Pointer to the instance data (internal use only).
nref: c_int
Reference counter (internal use only).
addref: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t) -> c_int>
Increment the reference counter. @param params The pointer to this parameter instance. @return int The reference count after this increment.
release: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t) -> c_int>
Decrement the reference counter. @param params The pointer to this parameter instance. @return int The reference count after this operation.
num: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t) -> c_int>
Obtain the number of available parameters. @param params The pointer to this parameter instance. @return int The number of parameters maintained by this object.
name: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: c_int, _: *mut *mut c_char) -> c_int>
Obtain the name of a parameter. @param params The pointer to this parameter instance. @param i The parameter index. @param ptr_name *ptr_name points to the parameter name. @return int \c 0 always.
set: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: *const c_char) -> c_int>
Set a parameter value. @param params The pointer to this parameter instance. @param name The parameter name. @param value The parameter value in string format. @return int \c 0 if the parameter is found, \c -1 otherwise.
get: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: *mut *mut c_char) -> c_int>
Get a parameter value. @param params The pointer to this parameter instance. @param name The parameter name. @param ptr_value *ptr_value presents the parameter value in string format. @return int \c 0 if the parameter is found, \c -1 otherwise.
set_int: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: c_int) -> c_int>
Set an integer value of a parameter. @param params The pointer to this parameter instance. @param name The parameter name. @param value The parameter value. @return int \c 0 if the parameter value is set successfully, \c -1 otherwise (unknown parameter or incompatible type).
set_float: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: floatval_t) -> c_int>
Set a float value of a parameter. @param params The pointer to this parameter instance. @param name The parameter name. @param value The parameter value. @return int \c 0 if the parameter value is set successfully, \c -1 otherwise (unknown parameter or incompatible type).
set_string: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: *const c_char) -> c_int>
Set a string value of a parameter. @param params The pointer to this parameter instance. @param name The parameter name. @param value The parameter value. @return int \c 0 if the parameter value is set successfully, \c -1 otherwise (unknown parameter or incompatible type).
get_int: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: *mut c_int) -> c_int>
Get an integer value of a parameter. @param params The pointer to this parameter instance. @param name The parameter name. @param ptr_value The pointer to a variable that receives the integer value. @return int \c 0 if the parameter value is obtained successfully, \c -1 otherwise (unknown parameter or incompatible type).
get_float: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: *mut floatval_t) -> c_int>
Get a float value of a parameter. @param params The pointer to this parameter instance. @param name The parameter name. @param ptr_value The pointer to a variable that receives the float value. @return int \c 0 if the parameter value is obtained successfully, \c -1 otherwise (unknown parameter or incompatible type).
get_string: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: *mut *mut c_char) -> c_int>
Get a string value of a parameter. @param params The pointer to this parameter instance. @param name The parameter name. @param ptr_value *ptr_value presents the parameter value. @return int \c 0 if the parameter value is obtained successfully, \c -1 otherwise (unknown parameter or incompatible type).
help: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char, _: *mut *mut c_char, _: *mut *mut c_char) -> c_int>
Get the help message of a parameter. @param params The pointer to this parameter instance. @param name The parameter name. @param ptr_type The pointer to \c char* to which this function store the type of the parameter. @param ptr_help The pointer to \c char* to which this function store the help message of the parameter. @return int \c 0 if the parameter is found, \c -1 otherwise.
free: Option<unsafe extern "C" fn(_: *mut crfsuite_params_t, _: *const c_char)>
Free the memory block of a string allocated by this object. @param params The pointer to this parameter instance. @param str The pointer to the string.
Trait Implementations
impl Debug for tag_crfsuite_params
[src]
impl Copy for tag_crfsuite_params
[src]
impl Clone for tag_crfsuite_params
[src]
fn clone(&self) -> tag_crfsuite_params
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more