Skip to main content

Module encoding

Module encoding 

Source
Expand description

Contains the BinaryEncodable trait and helpers for reading and writing of scalar values and other primitives.

Macros§

impl_encoded_as
Implement the encodable traits for a type, using the provided functions to convert to and from some other type.

Structs§

DecodingOptions
General decoding options.
DepthGauge
Depth gauge is used on potentially recursive structures like Variant & ExtensionObject during decoding to limit the depth the decoder will go before giving up.
DepthLock
Depth lock holds a reference on the depth gauge. The drop ensures impl that the reference is decremented even if there is a panic unwind.
Error
General OPC-UA error.

Enums§

BuiltInDataEncoding
Parsed data encoding, only built-in encodings.
DataEncoding
Parsed data encoding.

Traits§

BinaryDecodable
Trait for decoding a type from OPC UA binary.
BinaryEncodable
OPC UA Binary Encoding interface. Anything that encodes to binary must implement this. It provides functions to calculate the size in bytes of the struct (for allocating memory), encoding to a stream and decoding from a stream.
SimpleBinaryDecodable
Trait for decoding a type that cannot contain any custom types from OPC UA binary. Used in some core modules to decode raw binary messages.
SimpleBinaryEncodable
Trait for encoding a type that cannot contain any custom types to OPC UA binary. Used in some core modules to encode raw binary messages.
UaNullable
Trait implemented by OPC-UA types, indicating whether they are null or not, for use in encoding.

Functions§

byte_len_array
Calculates the length in bytes of an array of encoded type
process_decode_io_result
Converts an IO encoding error (and logs when in error) into an EncodingResult
process_encode_io_result
Converts an IO encoding error (and logs when in error) into an EncodingResult
read_bytes
Reads an array of bytes from the stream
read_f32
Read a 32-bit precision value from the stream
read_f64
Read a 64-bit precision from the stream
read_i16
Read an signed 16-bit value from the stream
read_i32
Read a signed 32-bit value from the stream
read_i64
Read a signed 64-bit value from the stream
read_u8
Read an unsigned byte from the stream
read_u16
Read an unsigned 16-bit value from the stream
read_u32
Read an unsigned 32-bit value from the stream
read_u64
Read an unsigned 64-bit value from the stream
skip_bytes
Skip bytes bytes in the stream.
write_bytes
Writes a series of identical bytes to the stream
write_f32
Writes a 32-bit precision value to the stream
write_f64
Writes a 64-bit precision value to the stream
write_i16
Writes a signed 16-bit value to the stream
write_i32
Writes a signed 32-bit value to the stream
write_i64
Writes a signed 64-bit value to the stream
write_u8
Writes an unsigned byte to the stream
write_u16
Writes an unsigned 16-bit value to the stream
write_u32
Writes an unsigned 32-bit value to the stream
write_u64
Writes an unsigned 64-bit value to the stream

Type Aliases§

EncodingResult
Result of an encoding or decoding operation.