[][src]Struct toposort_scc::IndexGraphBuilder

pub struct IndexGraphBuilder<'g> { /* fields omitted */ }

A builder object that allows to easily add edges to a graph

It stores a vertex index, so that edges can be added specifying only the target edge or source edge.

See IndexGraph::from_graph() for usage examples

Implementations

impl<'_> IndexGraphBuilder<'_>[src]

pub fn as_graph(&self) -> &IndexGraph[src]

Returns a reference to the stored graph

pub fn as_mut_graph(&mut self) -> &mut IndexGraph[src]

Returns a mutable reference to the stored graph

pub fn index(&self) -> usize[src]

Returns the stored index

pub fn add_out_edge(&mut self, index: usize)[src]

Add an edge from the stored index to the passed index

This method does not check for duplicate edges.

pub fn add_in_edge(&mut self, index: usize)[src]

Add an edge from the passed index to the stored index

This method does not check for duplicate edges.

Trait Implementations

impl<'g> Debug for IndexGraphBuilder<'g>[src]

Auto Trait Implementations

impl<'g> RefUnwindSafe for IndexGraphBuilder<'g>

impl<'g> Send for IndexGraphBuilder<'g>

impl<'g> Sync for IndexGraphBuilder<'g>

impl<'g> Unpin for IndexGraphBuilder<'g>

impl<'g> !UnwindSafe for IndexGraphBuilder<'g>

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.