double_cbor_with_access

Function double_cbor_with_access 

Source
pub fn double_cbor_with_access() -> (impl Handler + Reporting, Arc<Mutex<MyCBOR>>)
Expand description

Build a handler that gives access to a single MyCBOR object on two paths, and to the rest of the application

As the MyCBOR object is now stored in an Arc and referenced through a Mutex, it can be in two places in the tree at the same time, and even be accessed by the application at the same time.