pub fn new(value: D, reader: fn(&T) -> D, writer: fn(&T, D), new: fn(D) -> T) -> Self {
        let (tx, rx) = state_broadcast_channel();
        Self {
            value: Arc::new(new(value)),
            reader,
            writer,
            new,
            tx,
            rx,
        }
    }
/// To make a new Generic State type.
///
/// Description
///
///  * `value` - The data to store
///  * `reader` - The reader function which reads the function
///  * `writer` - The writer function
///  * `new` - To make enclose the `value`, eg: Mutex::new
To make a new Generic State type.
Description


To make a new Generic State type . Description
pub fn new(value: D, reader: fn(&T) -> D, writer: fn(&T, D), new: fn(D) -> T) -> Self {
        let (tx, rx) = state_broadcast_channel();
        Self {
            value: Arc::new(new(value)),
            reader,
            writer,
            new,
            tx,
            rx,
        }
    }
pub fn new ( value : D , reader : fn ( & T ) -> D , writer : fn ( & T , D ) , new : fn ( D ) -> T ) -> Self { let ( tx , rx ) = state_broadcast_channel ( ) ; Self { value : Arc :: new ( new ( value ) ) , reader , writer , new , tx , rx , } }
To make a new Generic State type.
To make a new Generic State type .
value
D
reader
fn(&T) -> D
writer
fn(&T, D)
new
fn(D) -> T