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.

Utility function to save a palette map to a file.

The file content will follow the format described in [from_stream()].

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.