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

Method from_proto

chirpstack/src/api/helpers.rs:22–39  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

20
21impl FromProto<CommonName> for common::Region {
22 fn from_proto(self) -> CommonName {
23 match self {
24 common::Region::Eu868 => CommonName::EU868,
25 common::Region::Us915 => CommonName::US915,
26 common::Region::Cn779 => CommonName::CN779,
27 common::Region::Eu433 => CommonName::EU433,
28 common::Region::Au915 => CommonName::AU915,
29 common::Region::Cn470 => CommonName::CN470,
30 common::Region::As923 => CommonName::AS923,
31 common::Region::As9232 => CommonName::AS923_2,
32 common::Region::As9233 => CommonName::AS923_3,
33 common::Region::As9234 => CommonName::AS923_4,
34 common::Region::Kr920 => CommonName::KR920,
35 common::Region::In865 => CommonName::IN865,
36 common::Region::Ru864 => CommonName::RU864,
37 common::Region::Ism2400 => CommonName::ISM2400,
38 }
39 }
40}
41
42impl ToProto<common::Region> for CommonName {

Calls

no outgoing calls

Tested by

no test coverage detected