pub enum ProtocolBinding {
Mqtt {
publish_topic: SmolStr,
subscribe_topic: SmolStr,
qos: Qos,
codec: PayloadCodec,
},
Modbus {
unit_id: u8,
area: RegisterArea,
address: u16,
data_type: DataType,
byte_order: ByteOrder,
},
Coap {
uri: SmolStr,
content_format: ContentFormat,
observable: bool,
},
OpcUa {
node_id: SmolStr,
attribute: u32,
},
}Expand description
Concrete protocol address backing one PropertyPath.
Each protocol crate handles exactly one variant — the others are transparent to it. The variants are gated by the corresponding feature flag in the umbrella crate but are always defined here (unconditionally) so that the gateway can walk a heterogeneous mapping.
Variants§
Mqtt
MQTT topic + QoS + payload encoding.
Fields
§
codec: PayloadCodecPayload codec.
Modbus
Modbus register address.
Fields
§
area: RegisterAreaCoil / discrete-input / holding / input register area.
Coap
CoAP resource URI.
Fields
§
content_format: ContentFormatContent-Format option to send.
OpcUa
OPC UA node — node_id is held as the canonical text form
(ns=2;s=PumpTemp). The OPC UA crate parses it lazily.
Trait Implementations§
Source§impl Clone for ProtocolBinding
impl Clone for ProtocolBinding
Source§fn clone(&self) -> ProtocolBinding
fn clone(&self) -> ProtocolBinding
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProtocolBinding
impl Debug for ProtocolBinding
Source§impl<'de> Deserialize<'de> for ProtocolBinding
impl<'de> Deserialize<'de> for ProtocolBinding
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ProtocolBinding
impl PartialEq for ProtocolBinding
Source§impl Serialize for ProtocolBinding
impl Serialize for ProtocolBinding
impl StructuralPartialEq for ProtocolBinding
Auto Trait Implementations§
impl Freeze for ProtocolBinding
impl RefUnwindSafe for ProtocolBinding
impl Send for ProtocolBinding
impl Sync for ProtocolBinding
impl Unpin for ProtocolBinding
impl UnsafeUnpin for ProtocolBinding
impl UnwindSafe for ProtocolBinding
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more