Struct crfsuite_sys::tag_crfsuite_dictionary
[−]
[src]
#[repr(C)]pub struct tag_crfsuite_dictionary { pub internal: *mut c_void, pub nref: c_int, pub addref: Option<unsafe extern "C" fn(_: *mut crfsuite_dictionary_t) -> c_int>, pub release: Option<unsafe extern "C" fn(_: *mut crfsuite_dictionary_t) -> c_int>, pub get: Option<unsafe extern "C" fn(_: *mut crfsuite_dictionary_t, _: *const c_char) -> c_int>, pub to_id: Option<unsafe extern "C" fn(_: *mut crfsuite_dictionary_t, _: *const c_char) -> c_int>, pub to_string: Option<unsafe extern "C" fn(_: *mut crfsuite_dictionary_t, _: c_int, _: *mut *const c_char) -> c_int>, pub num: Option<unsafe extern "C" fn(_: *mut crfsuite_dictionary_t) -> c_int>, pub free: Option<unsafe extern "C" fn(_: *mut crfsuite_dictionary_t, _: *const c_char)>, }
CRFSuite dictionary interface.
Fields
internal: *mut c_void
Pointer to the internal data (internal use only).
nref: c_int
Reference counter (internal use only).
addref: Option<unsafe extern "C" fn(_: *mut crfsuite_dictionary_t) -> c_int>
Increment the reference counter. @param dic The pointer to this dictionary instance. @return int The reference count after this increment.
release: Option<unsafe extern "C" fn(_: *mut crfsuite_dictionary_t) -> c_int>
Decrement the reference counter. @param dic The pointer to this dictionary instance. @return int The reference count after this operation.
get: Option<unsafe extern "C" fn(_: *mut crfsuite_dictionary_t, _: *const c_char) -> c_int>
Assign and obtain the integer ID for the string. @param dic The pointer to this dictionary instance. @param str The string. @return int The ID associated with the string if any, the new ID otherwise.
to_id: Option<unsafe extern "C" fn(_: *mut crfsuite_dictionary_t, _: *const c_char) -> c_int>
Obtain the integer ID for the string. @param dic The pointer to this dictionary instance. @param str The string. @return int The ID associated with the string if any, \c -1 otherwise.
to_string: Option<unsafe extern "C" fn(_: *mut crfsuite_dictionary_t, _: c_int, _: *mut *const c_char) -> c_int>
Obtain the string for the ID. @param dic The pointer to this dictionary instance. @param id the string ID. @param pstr \c *pstr points to the string associated with the ID if any, \c NULL otherwise. @return int \c 0 if the string ID is associated with a string, \c 1 otherwise.
num: Option<unsafe extern "C" fn(_: *mut crfsuite_dictionary_t) -> c_int>
Obtain the number of strings in the dictionary. @param dic The pointer to this dictionary instance. @return int The number of strings stored in the dictionary.
free: Option<unsafe extern "C" fn(_: *mut crfsuite_dictionary_t, _: *const c_char)>
Free the memory block allocated by to_string() function. @param dic The pointer to this dictionary instance. @param str The pointer to the string whose memory block is freed.
Trait Implementations
impl Debug for tag_crfsuite_dictionary
[src]
impl Copy for tag_crfsuite_dictionary
[src]
impl Clone for tag_crfsuite_dictionary
[src]
fn clone(&self) -> tag_crfsuite_dictionary
[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