pub enum DepictSpec {
Mol {Show 13 fields
smiles: Option<String>,
cxsmiles: Option<String>,
molfile: Option<String>,
id: Option<String>,
shade: Option<ShadeSpec>,
star_labels: Option<Vec<Option<String>>>,
align_to: Option<AlignTo>,
label: Option<Label>,
color: Option<String>,
scale: Option<f64>,
weight: Option<f64>,
halo: Option<bool>,
opts: Option<Opts>,
},
Group {
id: Option<String>,
align: bool,
children: Vec<Node>,
opts: Option<Opts>,
color: Option<String>,
scale: Option<f64>,
},
ReactionScheme {
id: Option<String>,
children: Vec<Node>,
layout: Option<LayoutOpts>,
opts: Option<Opts>,
color: Option<String>,
scale: Option<f64>,
},
}Expand description
Declarative document (mol, group, or reaction_scheme root).
Variants§
Mol
Fields
Group
Fields
ReactionScheme
Reaction / pathway scheme: mixed node children (mol | edge | text).
Implementations§
Source§impl DepictSpec
impl DepictSpec
Sourcepub fn mols(&self) -> Vec<MolNode>
pub fn mols(&self) -> Vec<MolNode>
Flatten to mol nodes in document order (skips edge / text children).
Sourcepub fn node_by_id(&self, id: &str) -> Option<&Node>
pub fn node_by_id(&self, id: &str) -> Option<&Node>
Look up a mol or text node by id (for label / lane refs).
pub fn align_enabled(&self) -> bool
Sourcepub fn container_opts(&self) -> Option<&Opts>
pub fn container_opts(&self) -> Option<&Opts>
Container-level opts bag (group or reaction_scheme).
Sourcepub fn group_opts(&self) -> Option<&Opts>
pub fn group_opts(&self) -> Option<&Opts>
Group-level opts bag (if this is a group).
Sourcepub fn resolve_mol_chrome(&self, i: usize) -> MolOpts
pub fn resolve_mol_chrome(&self, i: usize) -> MolOpts
Resolve cascading mol opts for child index i (0 for a mol root).
Order: container opts list → container flat common → node opts list →
node local flat fields (incl. legacy shade window).
Trait Implementations§
Source§impl Clone for DepictSpec
impl Clone for DepictSpec
Source§fn clone(&self) -> DepictSpec
fn clone(&self) -> DepictSpec
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 moreSource§impl Debug for DepictSpec
impl Debug for DepictSpec
Source§impl<'de> Deserialize<'de> for DepictSpec
impl<'de> Deserialize<'de> for DepictSpec
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
Auto Trait Implementations§
impl Freeze for DepictSpec
impl RefUnwindSafe for DepictSpec
impl Send for DepictSpec
impl Sync for DepictSpec
impl Unpin for DepictSpec
impl UnsafeUnpin for DepictSpec
impl UnwindSafe for DepictSpec
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