pub struct MountedNode { /* private fields */ }Expand description
Handle for a node that has already been mounted into a runtime graph.
This is the Rust-native fast path: keep the handle around and update the mounted node directly instead of rebuilding and reconciling a new graph.
§Fast-Path Updates
To enable efficient parameter updates:
- Create a graph with keyed nodes:
el::const_with_key("my_param", value) - Mount the graph:
mounted = graph.mount()? - Retrieve the node by key:
mounted.node_with_key("my_param")? - Send direct updates:
mounted.node.set_const_value(new_value)
This avoids rebuilding and reconciling the entire graph on each parameter change.
§Example
ⓘ
let mounted = Graph::new()
.render(el::const_with_key("freq", 440.0))
.mount();
// Update frequency without graph rebuild
if let Some(freq_node) = mounted.node_with_key("freq") {
let update = freq_node.set_const_value(880.0);
runtime.execute(&update);
}Implementations§
Source§impl MountedNode
impl MountedNode
Sourcepub fn set_property(
&self,
property: impl Into<String>,
value: Value,
) -> InstructionBatch
pub fn set_property( &self, property: impl Into<String>, value: Value, ) -> InstructionBatch
Creates a direct property update batch for this mounted node.
Sourcepub fn set_const_value(&self, value: f64) -> InstructionBatch
pub fn set_const_value(&self, value: f64) -> InstructionBatch
Convenience for updating a mounted const node’s numeric value.
Trait Implementations§
Source§impl Clone for MountedNode
impl Clone for MountedNode
Source§fn clone(&self) -> MountedNode
fn clone(&self) -> MountedNode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MountedNode
impl RefUnwindSafe for MountedNode
impl Send for MountedNode
impl Sync for MountedNode
impl Unpin for MountedNode
impl UnwindSafe for MountedNode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more