sound_flow 0.3.0

Execute graphs of functions in real time
Documentation
use crate::{Node, SocketDescription};

#[derive(Debug, Eq, PartialEq)]
pub struct Connection<Id> {
    pub from_node: Id,
    pub from_output_socket: usize,
    pub to_node: Id,
    pub to_input_socket: usize,
}

pub(crate) struct PendingInstruction<N: Node> {
    pub node: N,
    pub sockets: SocketDescription<N::Data>,
}

impl<N: Node> PendingInstruction<N> {
    pub fn new(node: N, config: &N::Config) -> Self {
        Self {
            sockets: node.sockets(config),
            node,
        }
    }
}