[−][src]Trait graphity::node::NodeWrapper
Wrapper around the internal representation of Node
.
This type abstracts all the nodes registered by the user. Its main
significance is that it is being returned from the graph when looking up
nodes. Read the Node
documentation to learn about its
usage.
Example
ⓘ
let node_index = graph.add_node(Generator(1)); let node_wrapper = graph.node(&node_index).unwrap(); let data = node_wrapper.read(GeneratorProducer);
Associated Types
Loading content...Provided methods
pub fn tick(&mut self)
[src]
pub fn read<IntoP>(&self, producer: IntoP) -> Self::Payload where
IntoP: Into<Self::Producer>,
[src]
IntoP: Into<Self::Producer>,
Read data from the given producer.
Panics
In case the given producer does not belong to this node type, this will panic.
pub fn write<IntoC>(&mut self, consumer: IntoC, _input: Self::Payload) where
IntoC: Into<Self::Consumer>,
[src]
IntoC: Into<Self::Consumer>,
Write data into the given consumer.
Panics
In case the given consumer does not belong to this node type, this will panic.