pub struct MolNode {Show 24 fields
pub type_: MolNodeKind,
pub smiles: Option<String>,
pub cxsmiles: Option<String>,
pub molfile: Option<String>,
pub id: Option<String>,
pub shade: Option<ShadeSpec>,
pub star_labels: Option<Vec<Option<String>>>,
pub align_to: Option<AlignTo>,
pub label: Option<Label>,
pub name: Option<MolText>,
pub atom_number: Option<AtomNumberSpec>,
pub atom_label: Option<AtomLabelSpec>,
pub region: Option<RegionField>,
pub circle: Option<CircleField>,
pub callout: Option<CalloutField>,
pub color: Option<String>,
pub scale: Option<f64>,
pub weight: Option<f64>,
pub halo: Option<bool>,
pub aromatic: Option<AromaticStyle>,
pub debug_box: Option<bool>,
pub debug_align: Option<bool>,
pub pad: Option<f64>,
pub opts: Option<Opts>,
}Expand description
Mol node — MolOpts fields + non-cascading identity / scores / align.
Fields§
§type_: MolNodeKind§smiles: Option<String>§cxsmiles: Option<String>§molfile: Option<String>§id: Option<String>§shade: Option<ShadeSpec>Shade scores (+ legacy window); window also cascades via Opts.
star_labels: Option<Vec<Option<String>>>§align_to: Option<AlignTo>Template id string, or { "ref", "atom_map"?, "min_atoms"?, "mode"?, "timeout_ms"? }.
label: Option<Label>Caption: Label (string id, list, or {id, pos?} — text-node refs).
Prefer privileged Self::name for inline mol captions. label id-refs
remain for legacy / multi-caption layouts.
pos on a placement chooses caption side (above/below/left/right);
hosts measure the resolved text and fold that into node size for layout.
name: Option<MolText>Privileged figure name / caption painted inside the mol SVG (default below).
atom_number: Option<AtomNumberSpec>Atom index / map-number labels ("index" | "mapno" | policy object).
atom_label: Option<AtomLabelSpec>Per-atom arbitrary text map ({ "1": "α" } or { "labels": {…}, "scale"? }).
region: Option<RegionField>Region highlight(s) — one object or a list.
circle: Option<CircleField>Atom / bond / ring highlight circle(s).
callout: Option<CalloutField>Callout annotation(s).
color: Option<String>§scale: Option<f64>§weight: Option<f64>§halo: Option<bool>§aromatic: Option<AromaticStyle>Aromatic ring paint: circle (default) or kekule.
debug_box: Option<bool>Paint dashed debug rectangles for layout boxes (labels / mol / scene).
debug_align: Option<bool>Paint alignment correspondence (matched atom tags + mol role badge).
pad: Option<f64>Post-layout SVG viewBox pad (px). Omit → small house default (rarely override).
opts: Option<Opts>Cascade patches for this node (list or singleton).
Implementations§
Source§impl MolNode
impl MolNode
Sourcepub fn local_opts(&self) -> MolOpts
pub fn local_opts(&self) -> MolOpts
Local leaf opts from flat fields (+ legacy shade window).
pub fn structure(&self) -> Result<&str, String>
Sourcepub fn overlay_fields(&self) -> MolOverlayFields
pub fn overlay_fields(&self) -> MolOverlayFields
Wire overlay bag (excludes privileged Self::name).
Sourcepub fn annotations(&self) -> Vec<Annotation>
pub fn annotations(&self) -> Vec<Annotation>
Internal Annotation IR for paint / occupancy (sorted by z).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MolNode
impl<'de> Deserialize<'de> for MolNode
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>,
Source§impl From<MolNode> for DepictSpec
impl From<MolNode> for DepictSpec
Auto Trait Implementations§
impl Freeze for MolNode
impl RefUnwindSafe for MolNode
impl Send for MolNode
impl Sync for MolNode
impl Unpin for MolNode
impl UnsafeUnpin for MolNode
impl UnwindSafe for MolNode
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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