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(params: *mut crfsuite_params_t) -> c_int>, pub release: Option<unsafe extern "C" fn(params: *mut crfsuite_params_t) -> c_int>, pub num: Option<unsafe extern "C" fn(params: *mut crfsuite_params_t) -> c_int>, pub name: Option<unsafe extern "C" fn(params: *mut crfsuite_params_t, i: c_int, ptr_name: *mut *mut c_char) -> c_int>, pub set: Option<unsafe extern "C" fn(params: *mut crfsuite_params_t, name: *const c_char, value: *const c_char) -> c_int>, pub get: Option<unsafe extern "C" fn(params: *mut crfsuite_params_t, name: *const c_char, ptr_value: *mut *mut c_char) -> c_int>, pub set_int: Option<unsafe extern "C" fn(params: *mut crfsuite_params_t, name: *const c_char, value: c_int) -> c_int>, pub set_float: Option<unsafe extern "C" fn(params: *mut crfsuite_params_t, name: *const c_char, value: floatval_t) -> c_int>, pub set_string: Option<unsafe extern "C" fn(params: *mut crfsuite_params_t, name: *const c_char, value: *const c_char) -> c_int>, pub get_int: Option<unsafe extern "C" fn(params: *mut crfsuite_params_t, name: *const c_char, ptr_value: *mut c_int) -> c_int>, pub get_float: Option<unsafe extern "C" fn(params: *mut crfsuite_params_t, name: *const c_char, ptr_value: *mut floatval_t) -> c_int>, pub get_string: Option<unsafe extern "C" fn(params: *mut crfsuite_params_t, name: *const c_char, ptr_value: *mut *mut c_char) -> c_int>, pub help: Option<unsafe extern "C" fn(params: *mut crfsuite_params_t, name: *const c_char, ptr_type: *mut *mut c_char, ptr_help: *mut *mut c_char) -> c_int>, pub free: Option<unsafe extern "C" fn(params: *mut crfsuite_params_t, str: *const c_char)>, }

CRFSuite parameter interface.

Fields

Pointer to the instance data (internal use only).

Reference counter (internal use only).

Increment the reference counter.

params The pointer to this parameter instance.

Returns the reference count after this increment.

Decrement the reference counter.

params The pointer to this parameter instance.

Returns the reference count after this operation.

Obtain the number of available parameters.

params The pointer to this parameter instance.

Returns the number of parameters maintained by this object.

Obtain the name of a parameter.

  • params The pointer to this parameter instance.
  • i The parameter index.
  • ptr_name *ptr_name points to the parameter name.

Returns int \c 0 always.

Set a parameter value.

  • params The pointer to this parameter instance.
  • name The parameter name.
  • value The parameter value in string format.

Returns int \c 0 if the parameter is found, \c -1 otherwise.

Get a parameter value.

  • params The pointer to this parameter instance.
  • name The parameter name.
  • ptr_value *ptr_value presents the parameter value in string format.

Returns int \c 0 if the parameter is found, \c -1 otherwise.

Set an integer value of a parameter.

  • params The pointer to this parameter instance.
  • name The parameter name.
  • value The parameter value.

Returns int \c 0 if the parameter value is set successfully, \c -1 otherwise (unknown parameter or incompatible type).

Set a float value of a parameter.

  • params The pointer to this parameter instance.
  • name The parameter name.
  • value The parameter value.

Returns int \c 0 if the parameter value is set successfully, \c -1 otherwise (unknown parameter or incompatible type).

Set a string value of a parameter.

  • params The pointer to this parameter instance.
  • name The parameter name.
  • value The parameter value.

Returns int \c 0 if the parameter value is set successfully, \c -1 otherwise (unknown parameter or incompatible type).

Get an integer value of a parameter.

  • params The pointer to this parameter instance.
  • name The parameter name.
  • ptr_value The pointer to a variable that receives the integer value.

Returns int \c 0 if the parameter value is obtained successfully, \c -1 otherwise (unknown parameter or incompatible type).

Get a float value of a parameter.

  • params The pointer to this parameter instance.
  • name The parameter name.
  • ptr_value The pointer to a variable that receives the float value.

Returns int \c 0 if the parameter value is obtained successfully, \c -1 otherwise (unknown parameter or incompatible type).

Get a string value of a parameter.

  • params The pointer to this parameter instance.
  • name The parameter name.
  • ptr_value *ptr_value presents the parameter value.

Returns int \c 0 if the parameter value is obtained successfully, \c -1 otherwise (unknown parameter or incompatible type).

Get the help message of a parameter.

  • params The pointer to this parameter instance.
  • name The parameter name.
  • ptr_type The pointer to \c char* to which this function store the type of the parameter.
  • ptr_help The pointer to \c char* to which this function store the help message of the parameter.

Returns int \c 0 if the parameter is found, \c -1 otherwise.

Free the memory block of a string allocated by this object.

  • params The pointer to this parameter instance.
  • str The pointer to the string.

Trait Implementations

impl Debug for tag_crfsuite_params
[src]

[src]

Formats the value using the given formatter. Read more

impl Copy for tag_crfsuite_params
[src]

impl Clone for tag_crfsuite_params
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations