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

Method new

src/state/mod.rs:10–15  ·  view source on GitHub ↗
(initial_state: T)

Source from the content-addressed store, hash-verified

8
9impl<T: Clone + 'static> Store<T> {
10 pub fn new(initial_state: T) -> Self {
11 Self {
12 state: Arc::new(Mutex::new(initial_state)),
13 subscribers: Vec::new(),
14 }
15 }
16
17 pub fn dispatch<A>(&mut self, action: A)
18 where

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected