MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / get

Function get

chirpstack/src/region.rs:75–86  ·  view source on GitHub ↗
(region_config_id: &str)

Source from the content-addressed store, hash-verified

73}
74
75pub fn get(region_config_id: &str) -> Result<Arc<Box<dyn region::Region + Sync + Send>>> {
76 let regions_r = REGIONS.read().unwrap();
77 Ok(regions_r
78 .get(region_config_id)
79 .ok_or_else(|| {
80 anyhow!(
81 "region_config_id '{}' does not exist in REGIONS",
82 region_config_id
83 )
84 })?
85 .clone())
86}
87
88/// This returns the (first) region-name, based on the given common-name.
89/// This function is used for roaming, as within the context of roaming, only

Callers 1

setupFunction · 0.70

Calls 2

unwrapMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected