pub struct DrawNode {Show 18 fields
pub id: String,
pub shape: NodeShape,
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 belief: Option<(Vec<f64>, (u8, u8, u8))>,
pub prior: Option<(Vec<f64>, (u8, u8, u8))>,
pub states: Option<(Vec<StateBar>, (u8, u8, u8))>,
pub density: Option<(NodeDensity, (u8, u8, u8))>,
pub fill: Option<(u8, u8, u8)>,
pub icon: Option<NodeIcon>,
pub table: Option<(NodeTable, (u8, u8, u8))>,
pub ring: Option<(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.
shape: NodeShapeIts mark; anything but a box shows only the label.
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 (or circle, square) outline.
accent: Option<(u8, u8, u8)>A thin bar along the box’s left edge; a filled mark (an observation, a terminal) is filled with it instead.
spark: Option<(Vec<f64>, (u8, u8, u8))>A sparkline (two values or more) along the bottom, and its colour.
belief: Option<(Vec<f64>, (u8, u8, u8))>A belief curve over the node (a factor graph variable’s density): heights 0..=1 at evenly spaced points (three or more), and its colour.
prior: Option<(Vec<f64>, (u8, u8, u8))>The prior behind the belief curve: heights on the same scale and
span as DrawNode::belief, drawn as a faint dashed outline, and
its colour.
states: Option<(Vec<StateBar>, (u8, u8, u8))>A discrete node’s states, one row each under the label (a boxed
shape; size it with states_box), and the bars’ colour.
density: Option<(NodeDensity, (u8, u8, u8))>A continuous node’s density under the label (a boxed shape; size it
with density_box), and its colour.
fill: Option<(u8, u8, u8)>The box’s (or diamond’s) fill; None is the card colour. E.g. a
node with evidence, shaded.
icon: Option<NodeIcon>A mark at the box’s top right corner, e.g. a hand for a node set by an intervention.
table: Option<(NodeTable, (u8, u8, u8))>A table under the label (a boxed shape; size it with
table_box), e.g. an influence diagram’s policy, and the colour
its marked cells are tinted with.
ring: Option<(u8, u8, u8)>A second outline around the box (or diamond), 4 px outside it and 2 px wide, in this colour: the node is singled out, e.g. adjusted for in a causal diagram (an adjustment set).
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 DrawNodewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
PhantomData<f64>: Freeze,
PhantomData<StateBar>: Freeze,
PhantomData<Vec<String>>: Freeze,
PhantomData<Option<usize>>: Freeze,
PhantomData<(String, Option<String>)>: Freeze,
impl Move for DrawNode
impl RefUnwindSafe for DrawNode
impl Send for DrawNodewhere
RawVecInner: Send,
impl Sync for DrawNodewhere
RawVecInner: Sync,
impl Unpin for DrawNode
impl UnsafeUnpin for DrawNodewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<f64>: UnsafeUnpin,
PhantomData<StateBar>: UnsafeUnpin,
PhantomData<Vec<String>>: UnsafeUnpin,
PhantomData<Option<usize>>: UnsafeUnpin,
PhantomData<(String, Option<String>)>: UnsafeUnpin,
impl UnwindSafe for DrawNodewhere
RawVecInner: UnwindSafe,
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
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> ⓘ
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> ⓘ
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