[][src]Struct paragraphs::graph::Graph

pub struct Graph<Node, Data> where
    Node: ThreadExecute<Data>,
    Data: Send + Sync
{ /* fields omitted */ }

Methods

impl<Node: 'static, Data: 'static> Graph<Node, Data> where
    Node: ThreadExecute<Data>,
    Data: Send + Sync
[src]

pub fn new(num_threads: usize) -> Graph<Node, Data>[src]

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

pub fn get(&self, index: usize) -> Option<&Node>[src]

pub fn get_mut(&mut self, index: usize) -> Option<&mut Node>[src]

pub fn add<Container, Elem>(&mut self, node: Node, inputs: Container) -> usize where
    Container: IntoIterator<Item = Elem>,
    Elem: Borrow<usize>, 
[src]

pub fn compile<Container, Elem>(&self, fetches: Container) -> Recipe where
    Container: IntoIterator<Item = Elem>,
    Elem: Borrow<usize>, 
[src]

pub fn run(
    &mut self,
    recipe: &Recipe,
    inputs_map: HashMap<usize, Vec<Data>>
) -> HashMap<usize, Data>
[src]

Trait Implementations

impl<Node, Data> IntoIterator for Graph<Node, Data> where
    Node: ThreadExecute<Data>,
    Data: Send + Sync
[src]

type Item = Node

The type of the elements being iterated over.

type IntoIter = Map<IntoIter<Option<Node>>, fn(_: Option<Node>) -> Node>

Which kind of iterator are we turning this into?

impl<'a, Node, Data> IntoIterator for &'a Graph<Node, Data> where
    Node: ThreadExecute<Data>,
    Data: Send + Sync
[src]

type Item = &'a Node

The type of the elements being iterated over.

type IntoIter = Map<Iter<'a, Option<Node>>, fn(_: &Option<Node>) -> &Node>

Which kind of iterator are we turning this into?

impl<'a, Node, Data> IntoIterator for &'a mut Graph<Node, Data> where
    Node: ThreadExecute<Data>,
    Data: Send + Sync
[src]

type Item = &'a mut Node

The type of the elements being iterated over.

type IntoIter = Map<IterMut<'a, Option<Node>>, fn(_: &mut Option<Node>) -> &mut Node>

Which kind of iterator are we turning this into?

impl<Node: Debug, Data: Debug> Debug for Graph<Node, Data> where
    Node: ThreadExecute<Data>,
    Data: Send + Sync
[src]

Auto Trait Implementations

impl<Node, Data> Send for Graph<Node, Data>

impl<Node, Data> !Sync for Graph<Node, Data>

Blanket Implementations

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

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.