pub(crate) fn find_color_for<F: FnMut(&str) -> Color>(
        &mut self,
        name: &str,
        mut compute_color: F,
    ) -> Color {
        match self.get(name) {
            Some(color) => color,
            None => {
                let color = compute_color(name);
                self.insert(name, color);
                color
            }
        }
    }
/// Returns the color value corresponding to the given function name if it is present.
/// Otherwise compute the color, and insert the new function name/color in the map.
Returns the color value corresponding to the given function name if it is present.
Otherwise compute the color, and insert the new function name/color in the map.
Returns the color value corresponding to the given function name if it is present . Otherwise compute the color and insert the new function name / color in the map .
pub(crate) fn find_color_for<F: FnMut(&str) -> Color>(
        &mut self,
        name: &str,
        mut compute_color: F,
    ) -> Color {
        match self.get(name) {
            Some(color) => color,
            None => {
                let color = compute_color(name);
                self.insert(name, color);
                color
            }
        }
    }
pub ( crate ) fn find_color_for < F : FnMut ( & str ) -> Color > ( & mut self , name : & str , mut compute_color : F , ) -> Color { match self . get ( name ) { Some ( color ) => color , None => { let color = compute_color ( name ) ; self . insert ( name , color ) ; color } } }
Returns the color value corresponding to the given function name if it is present.
Returns the color value corresponding to the given function name if it is present .
&mut self
name
&str
compute_color
F
&mut self
name
&str
compute_color
F