sound_flow 0.3.0

Execute graphs of functions in real time
Documentation
use crate::builder::descriptors::Connection;

#[derive(Debug, Eq, PartialEq)]
pub enum InvalidConnection {
    InvalidFromNode,
    InvalidFromOutputSocket,
    InvalidToNode,
    InvalidToInputSocket,
}

#[derive(Debug, Eq, PartialEq)]
pub struct InputSocket<Id> {
    pub node: Id,
    pub socket_index: usize,
}

#[derive(Debug, Eq, PartialEq)]
pub enum BuildError<Id> {
    /// The connection specifies an invalid socket address
    InvalidConnection(Connection<Id>, InvalidConnection),
    /// The connection's source and target types don't match
    TypeMismatch(Connection<Id>),
    /// A node socket doesn't have an input
    MissingInput(InputSocket<Id>),
    /// A node socket has more than one input
    MultipleInputs(InputSocket<Id>),
    /// A set of nodes cannot be computed because they depend on each other
    CircularDependencies(Vec<Connection<Id>>),
}