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

Function pb_json_to_prost

chirpstack/src/codec/convert.rs:108–115  ·  view source on GitHub ↗
(obj: &pbjson_types::Struct)

Source from the content-addressed store, hash-verified

106}
107
108pub fn pb_json_to_prost(obj: &pbjson_types::Struct) -> prost_types::Struct {
109 let mut out = prost_types::Struct::default();
110 for (k, v) in &obj.fields {
111 out.fields.insert(k.to_string(), _pb_json_to_prost(v));
112 }
113
114 out
115}
116
117fn _pb_json_to_prost(v: &pbjson_types::Value) -> prost_types::Value {
118 prost_types::Value {

Callers 1

handle_down_commandFunction · 0.85

Calls 3

_pb_json_to_prostFunction · 0.85
insertMethod · 0.80
to_stringMethod · 0.80

Tested by

no test coverage detected