GraphData

Trait GraphData 

Source
pub trait GraphData<T> {
    // Required methods
    fn data(&self) -> Option<&Box<T>>;
    fn data_mut(&mut self) -> Option<&mut Box<T>>;
}
Expand description

A Graph item that can hold generic data will implement this.

Required Methods§

Source

fn data(&self) -> Option<&Box<T>>

Returns a borrowed refference to the data.

Source

fn data_mut(&mut self) -> Option<&mut Box<T>>

Returns a borrowed mutable refference to the data.

Implementors§

Source§

impl<D, Ix> GraphData<D> for Cell<D, Ix>
where Ix: IndexType,

Source§

impl<D, Ix> GraphData<D> for Node<D, Ix>
where Ix: IndexType,

Source§

impl<E, Ix> GraphData<E> for Edge<E, Ix>
where Ix: IndexType,