pub struct LayoutOpts {
pub algorithm: Option<LayoutAlgorithm>,
pub direction: Option<LayoutDirection>,
pub edge_routing: Option<EdgeRouting>,
pub node_spacing: Option<f64>,
pub layer_spacing: Option<f64>,
pub refine: Option<bool>,
}Expand description
Layout for DepictSpec::ReactionScheme.
Backend-agnostic knobs — hosts map these onto ELK, Dagre, or another engine.
Defaults when omitted: LayoutDirection::Right, EdgeRouting::Polyline,
LayoutAlgorithm::Layered.
Individual EdgeNodes may override Self::edge_routing.
Spacing (px, document space) controls packing tightness:
Self::node_spacing— gap between nodes in the same layer (default ~20)Self::layer_spacing— gap between reactant/product layers (default ~0)
Fields§
§algorithm: Option<LayoutAlgorithm>Placement algorithm (layered / radial / force / stress).
direction: Option<LayoutDirection>Flow axis (right / left / up / down).
edge_routing: Option<EdgeRouting>Shaft style (polyline / orthogonal / splines).
node_spacing: Option<f64>Within-layer node gap (px). Smaller → tighter pack.
layer_spacing: Option<f64>Between-layer gap along the flow axis (px). Smaller → tighter pack.
refine: Option<bool>After ELK, refine edge routes and labels with the constraint solver.
Omit or true → refine on; false → stock ELK placement.
Implementations§
Source§impl LayoutOpts
impl LayoutOpts
Sourcepub const DEFAULT_NODE_SPACING: f64 = 20.0
pub const DEFAULT_NODE_SPACING: f64 = 20.0
Default within-layer gap for reaction schemes (px).
Sourcepub const DEFAULT_LAYER_SPACING: f64 = 0.0
pub const DEFAULT_LAYER_SPACING: f64 = 0.0
Default between-layer gap for reaction schemes (px).
pub fn algorithm_or_default(&self) -> LayoutAlgorithm
pub fn direction_or_default(&self) -> LayoutDirection
pub fn edge_routing_or_default(&self) -> EdgeRouting
pub fn node_spacing_or_default(&self) -> f64
pub fn layer_spacing_or_default(&self) -> f64
Sourcepub fn refine_enabled(&self) -> bool
pub fn refine_enabled(&self) -> bool
Energy-refine edges after ELK unless the host opted out.
Trait Implementations§
Source§impl Clone for LayoutOpts
impl Clone for LayoutOpts
Source§fn clone(&self) -> LayoutOpts
fn clone(&self) -> LayoutOpts
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LayoutOpts
impl Debug for LayoutOpts
Source§impl Default for LayoutOpts
impl Default for LayoutOpts
Source§fn default() -> LayoutOpts
fn default() -> LayoutOpts
Source§impl<'de> Deserialize<'de> for LayoutOpts
impl<'de> Deserialize<'de> for LayoutOpts
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 PartialEq for LayoutOpts
impl PartialEq for LayoutOpts
Source§impl Serialize for LayoutOpts
impl Serialize for LayoutOpts
impl StructuralPartialEq for LayoutOpts
Auto Trait Implementations§
impl Freeze for LayoutOpts
impl RefUnwindSafe for LayoutOpts
impl Send for LayoutOpts
impl Sync for LayoutOpts
impl Unpin for LayoutOpts
impl UnsafeUnpin for LayoutOpts
impl UnwindSafe for LayoutOpts
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