[][src]Struct opcua_server::prelude::ExtensionObject

pub struct ExtensionObject {
    pub node_id: NodeId,
    pub body: ExtensionObjectEncoding,
}

An extension object holds a serialized object identified by its node id.

Fields

node_id: NodeIdbody: ExtensionObjectEncoding

Methods

impl ExtensionObject[src]

pub fn null() -> ExtensionObject[src]

Creates a null extension object, i.e. one with no value or payload

pub fn is_null(&self) -> bool[src]

Tests for null node id.

pub fn is_empty(&self) -> bool[src]

Tests for empty body.

pub fn from_encodable<N, T>(node_id: N, encodable: &T) -> ExtensionObject where
    N: 'static + Into<NodeId>,
    T: BinaryEncoder<T>, 
[src]

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.

pub fn decode_inner<T>(
    &self,
    decoding_limits: &DecodingLimits
) -> Result<T, StatusCode> where
    T: BinaryEncoder<T>, 
[src]

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 BinaryEncoder<ExtensionObject> for ExtensionObject[src]

fn to_vec(&self) -> Vec<u8>[src]

impl Clone for ExtensionObject[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Serialize for ExtensionObject[src]

impl From<ExtensionObject> for Variant[src]

impl PartialEq<ExtensionObject> for ExtensionObject[src]

impl<'de> Deserialize<'de> for ExtensionObject[src]

impl Debug for ExtensionObject[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Erased for T