MCPcopy Create free account
hub / github.com/BillyDM/Firewheel / try_modify_graph

Method try_modify_graph

crates/firewheel-graph/src/context.rs:402–413  ·  view source on GitHub ↗

Try to modify the graph. If the given closure returns an error (or if a cycle is detected), then any changes made to the graph inside the closure will be reverted. Any custom error type can be used, though [`ModifyGraphError`](crate::error::ModifyGraphError) is provided for convenience.

(
        &mut self,
        f: impl FnOnce(&mut Self) -> Result<(), E>,
    )

Source from the content-addressed store, hash-verified

400 res
401 }
402
403 /// Get an immutable reference to the processor store.
404 ///
405 /// If an audio stream is currently running, this will return `None`.
406 pub fn proc_store(&self) -> Option<&ProcStore> {
407 if let Some(proc_channel) = &self.pending_processor_channel {
408 Some(&proc_channel.store)
409 } else if let Some(processor) = self.processor_drop_rx.as_ref() {
410 if let Some(processor) = processor.last() {
411 if processor.poisoned {
412 panic!("The audio thread has panicked!");
413 }
414
415 Some(&processor.extra.store)
416 } else {

Callers

nothing calls this directly

Calls 2

begin_modify_guardMethod · 0.80
end_modify_guardMethod · 0.80

Tested by

no test coverage detected