[][src]Struct force_graph::ForceGraph

pub struct ForceGraph<D, W> { /* fields omitted */ }

Implementations

impl<D, W> ForceGraph<D, W>[src]

pub fn new() -> Self[src]

pub fn get_graph(&self) -> &StableUnGraph<Node<D>, Edge<W>>[src]

pub fn add_node(
    &mut self,
    x: f32,
    y: f32,
    data: D,
    mass: f32,
    is_anchor: bool
) -> DefaultNodeIdx
[src]

pub fn remove_node(&mut self, idx: DefaultNodeIdx)[src]

pub fn add_edge(
    &mut self,
    n1_idx: DefaultNodeIdx,
    n2_idx: DefaultNodeIdx,
    edge: Edge<W>
)
[src]

pub fn clear(&mut self)[src]

pub fn update(&mut self, dt: f32)[src]

pub fn visit_nodes<F: FnMut(&Node<D>)>(&self, cb: F)[src]

pub fn visit_edges<F: FnMut(&Node<D>, &Node<D>, &Edge<W>)>(&self, cb: F)[src]

Auto Trait Implementations

impl<D, W> RefUnwindSafe for ForceGraph<D, W> where
    D: RefUnwindSafe,
    W: RefUnwindSafe
[src]

impl<D, W> Send for ForceGraph<D, W> where
    D: Send,
    W: Send
[src]

impl<D, W> Sync for ForceGraph<D, W> where
    D: Sync,
    W: Sync
[src]

impl<D, W> Unpin for ForceGraph<D, W> where
    D: Unpin,
    W: Unpin
[src]

impl<D, W> UnwindSafe for ForceGraph<D, W> where
    D: UnwindSafe,
    W: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.