pub struct ForceOpts {
pub seed: u64,
pub budget: IterationBudget,
pub rank_bias: Option<Direction>,
pub spacing: f64,
}Expand description
Options for force. Author-written, shape-stable: construct via
functional record update over Default (ADR-0003 §2):
use abstracttui_graph::{Direction, ForceOpts};
let opts = ForceOpts {
seed: 7,
rank_bias: Some(Direction::TopDown),
..Default::default()
};Fields§
§seed: u64PRNG seed for the initial scatter. Same seed + same budget +
same graph = identical Layout (golden-pinned).
budget: IterationBudgetIteration bound (default 256). The pass may freeze earlier when the system settles; it never runs longer.
rank_bias: Option<Direction>Optional flow tendency: edges are nudged so targets sit
downstream of sources along the given direction’s flow axis.
None (default) lays the graph out isotropically.
spacing: f64Characteristic spacing in cells (default 14): edge rest length and repulsion range both derive from it, plus the two cards’ radii.
Trait Implementations§
impl StructuralPartialEq for ForceOpts
Auto Trait Implementations§
impl Freeze for ForceOpts
impl RefUnwindSafe for ForceOpts
impl Send for ForceOpts
impl Sync for ForceOpts
impl Unpin for ForceOpts
impl UnsafeUnpin for ForceOpts
impl UnwindSafe for ForceOpts
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