[][src]Struct toposort_scc::ArenaGraphBuilder

pub struct ArenaGraphBuilder<'g, 'a, T, A: ArenaBehavior> { /* 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 ArenaGraph::from_graph() for usage examples

Implementations

impl<'a, '_, T, A: ArenaBehavior> ArenaGraphBuilder<'_, 'a, T, A>[src]

pub fn as_graph(&self) -> &ArenaGraph<'a, T, A>[src]

Returns a reference to the stored graph

pub fn as_mut_graph(&mut self) -> &mut ArenaGraph<'a, T, A>[src]

Returns a mutable reference to the stored graph

pub fn index(&self) -> A::Id[src]

Returns the stored id

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

Add an edge from the stored index to the passed id

This method does not check for duplicate edges.

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

Add an edge from the passed index to the stored id

This method does not check for duplicate edges.

Trait Implementations

impl<'g, 'a, T: Debug, A: Debug + ArenaBehavior> Debug for ArenaGraphBuilder<'g, 'a, T, A> where
    A::Id: Debug
[src]

Auto Trait Implementations

impl<'g, 'a, T, A> RefUnwindSafe for ArenaGraphBuilder<'g, 'a, T, A> where
    T: RefUnwindSafe,
    <A as ArenaBehavior>::Id: RefUnwindSafe

impl<'g, 'a, T, A> Send for ArenaGraphBuilder<'g, 'a, T, A> where
    T: Sync,
    <A as ArenaBehavior>::Id: Send

impl<'g, 'a, T, A> Sync for ArenaGraphBuilder<'g, 'a, T, A> where
    T: Sync,
    <A as ArenaBehavior>::Id: Sync

impl<'g, 'a, T, A> Unpin for ArenaGraphBuilder<'g, 'a, T, A> where
    <A as ArenaBehavior>::Id: Unpin,
    'a: 'g, 

impl<'g, 'a, T, A> !UnwindSafe for ArenaGraphBuilder<'g, 'a, T, A>

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.