Trait ForceGraphHelper

Source
pub trait ForceGraphHelper<N, E, Ty> {
    // Required methods
    fn add_force_node(&mut self, name: impl AsRef<str>, data: N) -> NodeIndex;
    fn add_force_node_with_coords(
        &mut self,
        name: impl AsRef<str>,
        data: N,
        location: Vec3,
    ) -> NodeIndex;
}
Expand description

Syntactic sugar to make adding Nodes to a ForceGraph easier.

Required Methods§

Source

fn add_force_node(&mut self, name: impl AsRef<str>, data: N) -> NodeIndex

Add a Node to the graph with only the name and arbitrary data.

Source

fn add_force_node_with_coords( &mut self, name: impl AsRef<str>, data: N, location: Vec3, ) -> NodeIndex

Add a Node to the graph with the name, arbitrary data, and a custom location.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<N, E, Ty: EdgeType> ForceGraphHelper<N, E, Ty> for ForceGraph<N, E, Ty>