Trait opcua_types::encoding::BinaryEncoder [] [src]

pub trait BinaryEncoder<T> {
    fn byte_len(&self) -> usize;
fn encode<S: Write>(&self, _: &mut S) -> EncodingResult<usize>;
fn decode<S: Read>(_: &mut S) -> EncodingResult<T>; }

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.

Required Methods

Returns the byte length of the structure. This calculation should be exact and as efficient as possible.

Encodes the instance to the write stream.

Decodes an instance from the read stream.

Implementors