Crate opcua_macros

Crate opcua_macros 

Source
Expand description

Crate containing various procedural macros used by rust OPC-UA.

Attribute Macros§

ua_encodable
Derive all the standard encoding traits on this struct or enum. This will derive BinaryEncodable, BinaryDecodable, JsonEncodable, JsonDecodable, XmlEncodable, XmlDecodable, XmlType, and UaEnum if the type is a simple enum.

Derive Macros§

BinaryDecodable
Derive the BinaryDecodable trait on this struct or enum, creating code to read the struct from an OPC-UA binary stream.
BinaryEncodable
Derive the BinaryEncodable trait on this struct or enum, creating code to write the struct to an OPC-UA binary stream.
Event
Derive the Event trait. This will also generate an implementation of the EventField trait.
EventField
Derive the EventField trait.
JsonDecodable
Derive the JsonDecodable trait on this struct or enum, creating code to read the struct from an OPC-UA stream with reversible encoding.
JsonEncodable
Derive the JsonEncodable trait on this struct or enum, creating code to write the struct to a JSON stream on OPC-UA reversible encoding.
UaEnum
Derive the UaEnum trait on this simple enum, creating code to convert it to and from OPC-UA string representation and its numeric representation. The enum must have a repr([int]) attribute.
UaNullable
Derive the UaNullable trait on this struct or enum. This indicates whether the value is null/default in OPC-UA encoding.
XmlDecodable
Derive the XmlDecodable trait on this struct or enum, creating code to read the struct from an OPC-UA xml stream.
XmlEncodable
Derive the XmlEncodable trait on this struct or enum, creating code to write the struct as OPC-UA XML.
XmlType
Derive the XmlType trait on this struct or enum. This simply exposes the type name, which can be overridden with an item-level opcua(rename = ...) attribute.