pub struct LegendEntry {
pub label: String,
pub color: Color,
pub swatch: SwatchKind,
}Expand description
A single legend entry consisting of a color swatch and a text label.
Each entry describes how to render one row inside the legend box:
- Line entries draw a short horizontal line segment in the given color.
- Filled entries draw a small filled rectangle in the given color.
Fields§
§label: StringThe display label shown next to the swatch.
color: ColorThe color used to render the swatch.
swatch: SwatchKindThe visual style of the swatch.
Implementations§
Trait Implementations§
Source§impl Clone for LegendEntry
impl Clone for LegendEntry
Source§fn clone(&self) -> LegendEntry
fn clone(&self) -> LegendEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LegendEntry
impl RefUnwindSafe for LegendEntry
impl Send for LegendEntry
impl Sync for LegendEntry
impl Unpin for LegendEntry
impl UnsafeUnpin for LegendEntry
impl UnwindSafe for LegendEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more