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

Method insert

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

Insert a new resource into the store. If a resource with this `TypeID` already exists, then an error will be returned instead.

(&mut self, resource: S)

Source from the content-addressed store, hash-verified

1038}
1039
1040/// A type-erased store accessible to all [`AudioNodeProcessor`]s.
1041pub struct ProcStore(HashMap<TypeId, Box<dyn Any + Send>>);
1042
1043impl ProcStore {
1044 pub fn with_capacity(capacity: usize) -> Self {
1045 let mut h = HashMap::default();
1046 h.reserve(capacity);
1047 Self(h)
1048 }
1049
1050 /// Insert a new resource into the store.

Callers 10

callbackMethod · 0.45
insert_anyMethod · 0.45
newMethod · 0.45
end_modify_guardMethod · 0.45
add_nodeMethod · 0.45
add_dyn_nodeMethod · 0.45
remove_nodeMethod · 0.45
connectMethod · 0.45
verify_nodeFunction · 0.45
callbackMethod · 0.45

Calls 1

entryMethod · 0.80

Tested by

no test coverage detected