pub struct Graph<N: Clone, R: Clone> { /* private fields */ }Implementations§
Source§impl<N: Clone, R: Clone> Graph<N, R>
impl<N: Clone, R: Clone> Graph<N, R>
pub fn new() -> Self
pub fn add_vertex(&mut self, node: N) -> NodeIndex
pub fn get_vertex(&self, id: NodeIndex) -> &VertexData<EdgeIndex, N>
pub fn get_edge_data(&self, id: EdgeIndex) -> EdgeData<NodeIndex, EdgeIndex, R>
pub fn add_edge( &mut self, rel: R, source: NodeIndex, target: NodeIndex, ) -> EdgeIndex
Trait Implementations§
Auto Trait Implementations§
impl<N, R> Freeze for Graph<N, R>
impl<N, R> RefUnwindSafe for Graph<N, R>where
N: RefUnwindSafe,
R: RefUnwindSafe,
impl<N, R> Send for Graph<N, R>
impl<N, R> Sync for Graph<N, R>
impl<N, R> Unpin for Graph<N, R>
impl<N, R> UnwindSafe for Graph<N, R>where
N: UnwindSafe,
R: 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