Skip to main content

add_attribute

Function add_attribute 

Source
pub fn add_attribute(
    attributes: &mut Vec<(String, String)>,
    key: &str,
    value: impl Display,
) -> bool
Expand description

Add an attribute to a sorted attribute list, maintaining sorted order via binary search.

Returns true if the key was new, false if it was a duplicate (value overwritten).