Skip to main content

get

Function get 

Source
pub unsafe extern "C" fn get(
    ls: *mut custom_labels_labelset_t,
    key: custom_labels_string_t,
) -> *const custom_labels_label_t
Expand description

Get the label corresponding to a key on the given label set, or NULL if none exists.

This function forwards to custom_labels_careful_get if ls is the current set.

SAFETY: The caller must not attempt to mutate anything through the returned pointer.

The caller must not attempt to access the returned pointer after any function that mutates the internal state is called. That is, after any call to custom_labels_set or custom_labels_delete (or the corresponding careful versions), any pointer returned by a previous call to custom_labels_get is invalid.