MCPcopy Create free account
hub / github.com/algoscienceacademy/RustUI / dispatch

Method dispatch

src/store/mod.rs:15–21  ·  view source on GitHub ↗
(&self, mutation: F)

Source from the content-addressed store, hash-verified

13 }
14
15 pub fn dispatch<F>(&self, mutation: F)
16 where
17 F: FnOnce(&mut T),
18 {
19 let mut state = self.state.borrow_mut();
20 mutation(&mut state);
21 }
22
23 pub fn get_state(&self) -> T {
24 self.state.borrow().clone()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected