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, andUaEnumif the type is a simple enum.
Derive Macros§
- Binary
Decodable - Derive the
BinaryDecodabletrait on this struct or enum, creating code to read the struct from an OPC-UA binary stream. - Binary
Encodable - Derive the
BinaryEncodabletrait on this struct or enum, creating code to write the struct to an OPC-UA binary stream. - Event
- Derive the
Eventtrait. This will also generate an implementation of theEventFieldtrait. - Event
Field - Derive the
EventFieldtrait. - Json
Decodable - Derive the
JsonDecodabletrait on this struct or enum, creating code to read the struct from an OPC-UA stream with reversible encoding. - Json
Encodable - Derive the
JsonEncodabletrait on this struct or enum, creating code to write the struct to a JSON stream on OPC-UA reversible encoding. - UaEnum
- Derive the
UaEnumtrait on this simple enum, creating code to convert it to and from OPC-UA string representation and its numeric representation. The enum must have arepr([int])attribute. - UaNullable
- Derive the
UaNullabletrait on this struct or enum. This indicates whether the value is null/default in OPC-UA encoding. - XmlDecodable
- Derive the
XmlDecodabletrait on this struct or enum, creating code to read the struct from an OPC-UA xml stream. - XmlEncodable
- Derive the
XmlEncodabletrait on this struct or enum, creating code to write the struct as OPC-UA XML. - XmlType
- Derive the
XmlTypetrait on this struct or enum. This simply exposes the type name, which can be overridden with an item-levelopcua(rename = ...)attribute.