Struct opcua_types::basic_types::ExtensionObject
[−]
[src]
pub struct ExtensionObject {
pub node_id: NodeId,
pub body: ExtensionObjectEncoding,
}A structure that contains an application specific data type that may not be recognized by the receiver. Data type ID 22
Fields
node_id: NodeId
body: ExtensionObjectEncoding
Methods
impl ExtensionObject[src]
fn null() -> ExtensionObject[src]
Creates a null extension object, i.e. one with no value or payload
fn is_null(&self) -> bool[src]
fn is_empty(&self) -> bool[src]
fn from_encodable<N, T>(node_id: N, encodable: T) -> ExtensionObject where
N: 'static + Into<NodeId>,
T: BinaryEncoder<T>, [src]
N: 'static + Into<NodeId>,
T: BinaryEncoder<T>,
Creates an extension object with the specified node id and the encodable object as its payload. The body is set to a byte string containing the encoded struct.
fn decode_inner<T>(&self) -> EncodingResult<T> where
T: BinaryEncoder<T>, [src]
T: BinaryEncoder<T>,
Decodes the inner content of the extension object and returns it. The node id is ignored for decoding. The caller supplies the binary encoder impl that should be used to extract the data. Errors result in a decoding error.
Trait Implementations
impl PartialEq for ExtensionObject[src]
fn eq(&self, __arg_0: &ExtensionObject) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &ExtensionObject) -> bool[src]
This method tests for !=.
impl Debug for ExtensionObject[src]
impl Clone for ExtensionObject[src]
fn clone(&self) -> ExtensionObject[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl BinaryEncoder<ExtensionObject> for ExtensionObject[src]
fn byte_len(&self) -> usize[src]
Returns the byte length of the structure. This calculation should be exact and as efficient as possible. Read more
fn encode<S: Write>(&self, stream: &mut S) -> EncodingResult<usize>[src]
Encodes the instance to the write stream.
fn decode<S: Read>(stream: &mut S) -> EncodingResult<Self>[src]
Decodes an instance from the read stream.