pub struct Graph { /* private fields */ }Expand description
A multichannel graph is a set of root nodes, one per output channel.
Implementations§
Source§impl Graph
impl Graph
Sourcepub fn render<R>(self, roots: R) -> Selfwhere
R: Into<GraphRoots>,
pub fn render<R>(self, roots: R) -> Selfwhere
R: Into<GraphRoots>,
Adds one or more output roots and returns the graph.
Sourcepub fn root<R>(self, roots: R) -> Selfwhere
R: Into<GraphRoots>,
pub fn root<R>(self, roots: R) -> Selfwhere
R: Into<GraphRoots>,
Backward-compatible alias for render.
Sourcepub fn with_root<R>(self, roots: R) -> Selfwhere
R: Into<GraphRoots>,
pub fn with_root<R>(self, roots: R) -> Selfwhere
R: Into<GraphRoots>,
Backward-compatible alias for render.
Sourcepub fn mount(&self) -> Result<MountedGraph, MountError>
pub fn mount(&self) -> Result<MountedGraph, MountError>
Lowers the graph and keeps mounted-node handles for direct updates.
Returns Err(MountError::DuplicateKey(...)) if two nodes in the
graph share the same key prop.
Sourcepub fn mount_with_id_counter(
&self,
next_id: &mut NodeId,
) -> Result<MountedGraph, MountError>
pub fn mount_with_id_counter( &self, next_id: &mut NodeId, ) -> Result<MountedGraph, MountError>
Lowers the graph using an external node-ID counter.
Each call advances next_id past all allocated IDs. This allows
successive graph rebuilds to produce unique node IDs within the
same runtime session, avoiding NodeAlreadyExists errors.
Returns Err(MountError::DuplicateKey(...)) if two nodes in the
graph share the same key prop.
Sourcepub fn lower(&self) -> InstructionBatch
pub fn lower(&self) -> InstructionBatch
Lowers the graph into a runtime instruction batch.
Panics if the graph contains duplicate keyed nodes. Prefer
[mount] for fallible access.