stinger-ipc 0.0.9__py3-none-any.whl → 0.0.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {stinger_ipc-0.0.9.dist-info → stinger_ipc-0.0.10.dist-info}/METADATA +1 -1
- {stinger_ipc-0.0.9.dist-info → stinger_ipc-0.0.10.dist-info}/RECORD +7 -7
- stingeripc/templates/rust/server/src/lib.rs.jinja2 +6 -4
- {stinger_ipc-0.0.9.dist-info → stinger_ipc-0.0.10.dist-info}/WHEEL +0 -0
- {stinger_ipc-0.0.9.dist-info → stinger_ipc-0.0.10.dist-info}/entry_points.txt +0 -0
- {stinger_ipc-0.0.9.dist-info → stinger_ipc-0.0.10.dist-info}/licenses/LICENSE +0 -0
- {stinger_ipc-0.0.9.dist-info → stinger_ipc-0.0.10.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
stinger_ipc-0.0.
|
1
|
+
stinger_ipc-0.0.10.dist-info/licenses/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
|
2
2
|
stingeripc/__init__.py,sha256=PTr5WfMfB-GL4vp3-XMU8IwGv3Q5RXQ24H7JuEo3hdk,133
|
3
3
|
stingeripc/args.py,sha256=x3P8GRu9-jyiMl62t0FPqbWY18FbhMVN4eSa2UzUv6c,3960
|
4
4
|
stingeripc/asyncapi.py,sha256=DJZuz_LiQEJjQGlnfRtgOToWVD55uLw5ZoiZ95-bxZc,23291
|
@@ -44,14 +44,14 @@ stingeripc/templates/rust/payloads/src/lib.rs.jinja2,sha256=3vBn2OGm_j7BoyHRHLcH
|
|
44
44
|
stingeripc/templates/rust/payloads/src/payloads.rs.jinja2,sha256=1PUSzmHLMBYsVaCR8gOMdHWK8dmODmLM3WSu9iysN-c,4380
|
45
45
|
stingeripc/templates/rust/server/Cargo.toml.jinja2,sha256=t2MIpoe34RYOtxvpS6ma7W0A9sLlMQBYblpALU805TQ,573
|
46
46
|
stingeripc/templates/rust/server/examples/server.rs.jinja2,sha256=NVNR_kamR3t4FSpfYGfao0S9DpK1zXTQcOZR1WDPAaI,3624
|
47
|
-
stingeripc/templates/rust/server/src/lib.rs.jinja2,sha256=
|
47
|
+
stingeripc/templates/rust/server/src/lib.rs.jinja2,sha256=OE9WxOUmKLc1iii8iXKn5BAwMpP9HXrIYcGdmZnQG7U,14973
|
48
48
|
stingeripc/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
49
49
|
stingeripc/tools/cli.py,sha256=oLfVQx4EqRgZ2AH9Xl7X6neXle-aJE55bSXTEvH7RDE,2303
|
50
50
|
stingeripc/tools/markdown_generator.py,sha256=HVEWcMjAfVnuWY29kxfAW1mvSxQSF-rdYFA2kWdLOn0,1174
|
51
51
|
stingeripc/tools/python_generator.py,sha256=GJwGI6DntkJPJjHN4xSeTD60KgY32gI43IvIByxWSsw,1845
|
52
52
|
stingeripc/tools/rust_generator.py,sha256=9E7SMDM-iHE3O26QI3ieAHIInlrLepWMAFRnflKk3KI,2235
|
53
|
-
stinger_ipc-0.0.
|
54
|
-
stinger_ipc-0.0.
|
55
|
-
stinger_ipc-0.0.
|
56
|
-
stinger_ipc-0.0.
|
57
|
-
stinger_ipc-0.0.
|
53
|
+
stinger_ipc-0.0.10.dist-info/METADATA,sha256=IWuujmhLBXd10UkK5gE5TMYfPHdPY1JTzev_X75npgs,6038
|
54
|
+
stinger_ipc-0.0.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
55
|
+
stinger_ipc-0.0.10.dist-info/entry_points.txt,sha256=bh8k8mvtAog4MKTd82ALSHqQkuD069VrZ-vNlde6XjE,204
|
56
|
+
stinger_ipc-0.0.10.dist-info/top_level.txt,sha256=mSNwAf83_1qiTP_vu7XEPBrZu-fDusT1FFyQZzCrRcU,11
|
57
|
+
stinger_ipc-0.0.10.dist-info/RECORD,,
|
@@ -50,13 +50,13 @@ struct {{stinger.name | UpperCamelCase}}Properties {
|
|
50
50
|
}
|
51
51
|
{%endif%}
|
52
52
|
{%endif%}{# any methods or properties #}
|
53
|
-
|
53
|
+
#[derive(Clone)]
|
54
54
|
pub struct {{stinger.rust.server_struct_name}} {
|
55
55
|
mqttier_client: MqttierClient,
|
56
56
|
{%if stinger.methods|length > 0 or stinger.properties|length > 0 %}
|
57
57
|
/// Temporarily holds the receiver for the MPSC channel. The Receiver will be moved
|
58
58
|
/// to a process loop when it is needed. MQTT messages will be received with this.
|
59
|
-
msg_streamer_rx: Option<mpsc::Receiver<ReceivedMessage
|
59
|
+
msg_streamer_rx: Arc<Mutex<Option<mpsc::Receiver<ReceivedMessage>>>>,
|
60
60
|
|
61
61
|
/// The Sender side of MQTT messages that are received from the broker. This tx
|
62
62
|
/// side is cloned for each subscription made.
|
@@ -133,7 +133,7 @@ impl {{stinger.rust.server_struct_name}} {
|
|
133
133
|
{{stinger.rust.server_struct_name}} {
|
134
134
|
mqttier_client: connection.clone(),
|
135
135
|
{%if stinger.methods|length > 0 or stinger.properties|length > 0 %}
|
136
|
-
msg_streamer_rx: Some(message_received_rx),
|
136
|
+
msg_streamer_rx: Arc::new(Mutex::new(Some(message_received_rx))),
|
137
137
|
msg_streamer_tx: message_received_tx,{%if stinger.methods | length > 0 %}
|
138
138
|
method_handlers: method_handlers,{%endif%}{%if stinger.properties | length > 0 %}
|
139
139
|
properties: property_values,{%endif%}
|
@@ -255,7 +255,9 @@ impl {{stinger.rust.server_struct_name}} {
|
|
255
255
|
|
256
256
|
{%if stinger.methods|length > 0 or stinger.properties|length > 0 %}
|
257
257
|
// Take ownership of the RX channel that receives MQTT messages. This will be moved into the loop_task.
|
258
|
-
let mut message_receiver =
|
258
|
+
let mut message_receiver = {
|
259
|
+
self.msg_streamer_rx.lock().unwrap().take().expect("msg_streamer_rx should be Some")
|
260
|
+
};
|
259
261
|
|
260
262
|
{%if stinger.methods|length > 0 -%}
|
261
263
|
let mut method_handlers = self.method_handlers.clone();
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|