Struct pprof::flamegraph::color::PaletteMap [−][src]
pub struct PaletteMap(_);
Expand description
Mapping of the association between a function name and the color used when drawing information from this function.
Implementations
Returns the color value corresponding to the given function name.
Inserts a function name/color pair in the map.
Provides an iterator over the elements of the map.
Builds a mapping based on the inputs given by the reader.
The reader should provide name/color pairs as text input, each pair separated by a line separator.
Each line should follow the format: NAME->rgb(RED, GREEN, BLUE) where NAME is the function name, and RED, GREEN, BLUE integer values between 0 and 255 included. Any line which does not follow the previous format will be ignored.
This function will propagate any std::io::Error
returned by the given reader.
Writes the palette map using the given writer. The output content will follow the same format described in [from_stream()] The name/color pairs will be sorted by name in lexicographic order.
Utility function to load a palette map from a file.
The file content should follow the format described in [from_stream()].
If the file does not exist, an empty palette map is returned.
Trait Implementations
Returns the “default value” for a type. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for PaletteMap
impl Send for PaletteMap
impl Sync for PaletteMap
impl Unpin for PaletteMap
impl UnwindSafe for PaletteMap
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.