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

Method custom_state_mut

crates/firewheel-core/src/node.rs:334–338  ·  view source on GitHub ↗

Get a mutable reference to the custom state that was created in [`AudioNodeInfo::custom_state`].

(&mut self)

Source from the content-addressed store, hash-verified

332 /// Get a mutable reference to the custom state that was created in
333 /// [`AudioNodeInfo::custom_state`].
334 pub fn custom_state_mut<T: 'static>(&mut self) -> Option<&mut T> {
335 self.custom_state
336 .as_mut()
337 .and_then(|s| s.downcast_mut::<T>())
338 }
339}
340
341/// A context for [`AudioNode::update`].

Callers

nothing calls this directly

Calls 1

as_mutMethod · 0.80

Tested by

no test coverage detected