pub struct EdgeNode {
pub type_: EdgeNodeKind,
pub sources: MolIds,
pub targets: MolIds,
pub label: Option<Label>,
pub edge_routing: Option<EdgeRouting>,
pub role: Option<String>,
pub arrow: EdgeArrow,
pub color: Option<String>,
pub stroke_width: Option<f64>,
pub dashed: bool,
}Expand description
Edge node — a reaction / network link between mol ids.
Self::sources / Self::targets are one or many mol ids (A+B → C+D).
Label chrome refs sibling text/mol nodes via Self::label.
Fields§
§type_: EdgeNodeKindWire discriminant — required so untagged Node does not absorb edges as mols.
sources: MolIdsReactant mol id(s) — "a" or ["a","b"] (alias: source).
targets: MolIdsProduct mol id(s) — "c" or ["c","d"] (alias: target).
label: Option<Label>Label chrome: id / list / {id, pos?} / {above,below,left,right}.
Hosts should measure each placement’s text (or mol viewport) and pass
those boxes to the layout engine with the placement pos (edge side).
edge_routing: Option<EdgeRouting>Per-edge override of scheme LayoutOpts::edge_routing.
role: Option<String>Optional semantic role (e.g. enzyme) — not drawn by default.
arrow: EdgeArrow§color: Option<String>§stroke_width: Option<f64>§dashed: boolImplementations§
Source§impl EdgeNode
impl EdgeNode
Sourcepub fn edge_routing_or(&self, scheme: &LayoutOpts) -> EdgeRouting
pub fn edge_routing_or(&self, scheme: &LayoutOpts) -> EdgeRouting
Effective shaft routing: edge override, else scheme layout default.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EdgeNode
impl<'de> Deserialize<'de> for EdgeNode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for EdgeNode
Auto Trait Implementations§
impl Freeze for EdgeNode
impl RefUnwindSafe for EdgeNode
impl Send for EdgeNode
impl Sync for EdgeNode
impl Unpin for EdgeNode
impl UnsafeUnpin for EdgeNode
impl UnwindSafe for EdgeNode
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