Struct fdg_img::Settings

source ·
pub struct Settings<N, E, Ty = Undirected> {
    pub sim_parameters: SimulationParameters<N, E, Ty>,
    pub iterations: usize,
    pub dt: f32,
    pub node_size: u32,
    pub node_color: RGBAColor,
    pub edge_size: u32,
    pub edge_color: RGBAColor,
    pub background_color: RGBAColor,
    pub print_progress: bool,
    pub text_style: Option<TextStyle<'static>>,
}
Expand description

Parameters for drawing the SVG image.

Fields§

§sim_parameters: SimulationParameters<N, E, Ty>

Simulation Parameters

§iterations: usize

Number of times to run the simulation

§dt: f32

“Granularity of simulation updates”

§node_size: u32

The radius of the nodes

§node_color: RGBAColor

RGBA color of the nodes

§edge_size: u32

Width of the edge lines

§edge_color: RGBAColor

RGBA color of the edge lines

§background_color: RGBAColor

RGBA background color

§print_progress: bool

If true, the simulation will be printed on each

§text_style: Option<TextStyle<'static>>

If supplied, the names of nodes will be written

Trait Implementations§

source§

impl<N, E, Ty: EdgeType> Default for Settings<N, E, Ty>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<N, E, Ty = Undirected> !RefUnwindSafe for Settings<N, E, Ty>

§

impl<N, E, Ty = Undirected> !Send for Settings<N, E, Ty>

§

impl<N, E, Ty = Undirected> !Sync for Settings<N, E, Ty>

§

impl<N, E, Ty> Unpin for Settings<N, E, Ty>

§

impl<N, E, Ty = Undirected> !UnwindSafe for Settings<N, E, Ty>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.