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

Class Store

src/state/mod.rs:4–7  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2use std::any::Any;
3
4pub struct Store<T: 'static> {
5 state: Arc<Mutex<T>>,
6 subscribers: Vec<Box<dyn Fn(&T)>>,
7}
8
9impl<T: Clone + 'static> Store<T> {
10 pub fn new(initial_state: T) -> Self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected