[][src]Function opensc_sys::list_contains

pub unsafe extern "C" fn list_contains(
    l: *const list_t,
    data: *const c_void
) -> c_int

inspect whether some data is member of the list.

@warning Requires a comparator function to be set for the list.

By default, a per-reference comparison is accomplished. That is, the data is in list if any element of the list points to the same location of data. A "semantic" comparison is accomplished, otherwise, if a comparator function has been set previously, with list_attributes_comparator(); in which case, the given data reference is believed to be in list iff comparator_fun(elementdata, userdata) == 0 for any element in the list.

@param l list to operate @param data reference to the data to search @return 0 iff the list does not contain data as an element

@see list_attributes_comparator()