pub struct DrawNode {
pub id: String,
pub lines: Vec<String>,
pub value: Option<String>,
pub badge: Option<(String, (u8, u8, u8))>,
pub stroke: (u8, u8, u8),
pub accent: Option<(u8, u8, u8)>,
pub spark: Option<(Vec<f64>, (u8, u8, u8))>,
pub tooltip: String,
pub attrs: Vec<DataAttr>,
}Expand description
What a node’s box shows, and its attributes. Its geometry comes from the
layout (PlacedNode); its label lines from node_box.
Fields§
§id: StringThe data-of group of everything drawn for the node.
lines: Vec<String>The label, wrapped (NodeBox::lines).
value: Option<String>A value line under the label.
badge: Option<(String, (u8, u8, u8))>A badge row: its text and its dot’s (and outline’s) colour.
stroke: (u8, u8, u8)The box outline.
accent: Option<(u8, u8, u8)>A thin bar along the box’s left edge.
spark: Option<(Vec<f64>, (u8, u8, u8))>A sparkline (two values or more) along the bottom, and its colour.
tooltip: String§attrs: Vec<DataAttr>data-* on the box (the hit target); every node lists the same
names, in the same order.
Trait Implementations§
Auto Trait Implementations§
impl Forget for DrawNode
impl Freeze for DrawNode
impl Move for DrawNode
impl RefUnwindSafe for DrawNode
impl Send for DrawNode
impl Sync for DrawNode
impl Unpin for DrawNode
impl UnsafeUnpin for DrawNode
impl UnwindSafe for DrawNode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more