[][src]Function opensc_sys::list_locate

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

find the position of an element in a list.

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

Inspects the given list looking for the given element; if the element is found, its position into the list is returned. Elements are inspected comparing references if a comparator has not been set. Otherwise, the comparator is used to find the element.

@param l list to operate @param data reference of the element to search for @return position of element in the list, or <0 if not found

@see list_attributes_comparator() @see list_get_at()