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

Pointer to the internal data (internal use only).

Reference counter (internal use only).

Increment the reference counter. @param dic The pointer to this dictionary instance. @return int The reference count after this increment.

Decrement the reference counter. @param dic The pointer to this dictionary instance. @return int The reference count after this operation.

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.

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.

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.

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 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]

[src]

Formats the value using the given formatter.

impl Copy for tag_crfsuite_dictionary
[src]

impl Clone for tag_crfsuite_dictionary
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more