pub enum GraphError {
CycleDetected {
nodes: Vec<NodeId>,
},
PortNotFound {
node: NodeId,
port: PortIdx,
},
PortDirectionMismatch {
from: (NodeId, PortIdx),
to: (NodeId, PortIdx),
},
PortIncompatible {
from: (NodeId, PortIdx),
to: (NodeId, PortIdx),
},
NotCompiled,
AlreadyCompiled,
NodeNotFound(NodeId),
}Expand description
Errors raised while building or compiling an audio Graph.
Every variant describes a construction- or compile-time failure. None of
these errors can originate on the real-time thread: link validation and
topological sorting both run in Graph::compile,
and the only RT-path error is GraphError::NotCompiled (a single branch).
Variants§
CycleDetected
The graph contains a cycle, so no valid processing order exists.
The accompanying node ids are those that remain after Kahn’s algorithm could make no further progress — i.e. the nodes participating in (or reachable into) the cycle.
PortNotFound
A referenced port does not exist on the named node.
PortDirectionMismatch
Two ports with incompatible directions were linked.
A valid edge connects an output port to an input port.
Fields
PortIncompatible
Two ports with mismatched channel counts or sample formats were linked.
Fields
NotCompiled
Graph::process_cycle was called before
the graph was compiled.
AlreadyCompiled
Graph::compile was called on an
already-compiled graph.
NodeNotFound(NodeId)
A referenced node id does not exist in the graph.
Trait Implementations§
Source§impl Clone for GraphError
impl Clone for GraphError
Source§fn clone(&self) -> GraphError
fn clone(&self) -> GraphError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GraphError
impl Debug for GraphError
Source§impl Display for GraphError
impl Display for GraphError
impl Eq for GraphError
Source§impl Error for GraphError
impl Error for GraphError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()