Function
set
(region_config_id: &str, r: Box<dyn region::Region + Sync + Send>)
Source from the content-addressed store, hash-verified
| 68 | } |
| 69 | |
| 70 | pub fn set(region_config_id: &str, r: Box<dyn region::Region + Sync + Send>) { |
| 71 | let mut regions_w = REGIONS.write().unwrap(); |
| 72 | regions_w.insert(region_config_id.to_string(), Arc::new(r)); |
| 73 | } |
| 74 | |
| 75 | pub fn get(region_config_id: &str) -> Result<Arc<Box<dyn region::Region + Sync + Send>>> { |
| 76 | let regions_r = REGIONS.read().unwrap(); |
Tested by
no test coverage detected