pub struct Settings<T> {
pub theta: T,
pub ka: T,
pub kg: T,
pub kr: T,
pub lin_log: bool,
pub prevent_overlapping: Option<T>,
pub speed: T,
pub strong_gravity: bool,
}Expand description
Settings for the graph layout
Fields§
§theta: TPrecision setting for Barnes-Hut computation
Must be in (0.0..1.0). 0.0 is accurate and slow, 1.0 is unaccurate and fast.
Default is 0.5.
ka: TAttraction coefficient
kg: TGravity coefficient
kr: TRepulsion coefficient
lin_log: boolLogarithmic attraction
prevent_overlapping: Option<T>Prevent node overlapping for a prettier graph.
Value is kr_prime.
Requires layout.sizes to be Some.
kr_prime is arbitrarily set to 100.0 in Gephi implementation.
speed: TSpeed factor
strong_gravity: boolGravity does not decrease with distance, resulting in a more compact graph.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Settings<T>where
T: Freeze,
impl<T> RefUnwindSafe for Settings<T>where
T: RefUnwindSafe,
impl<T> Send for Settings<T>where
T: Send,
impl<T> Sync for Settings<T>where
T: Sync,
impl<T> Unpin for Settings<T>where
T: Unpin,
impl<T> UnwindSafe for Settings<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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