[][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

Implementations

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 object_id(&self) -> Result<ObjectId, ()>[src]

Returns the object id of the thing this extension object contains, assuming the object id can be recognised from the node id.

pub fn from_encodable<N, T>(node_id: N, encodable: &T) -> ExtensionObject where
    N: 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]

impl Clone for ExtensionObject[src]

impl Debug for ExtensionObject[src]

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

impl<'_> From<&'_ Operand> for ExtensionObject[src]

impl From<ExtensionObject> for Variant[src]

impl From<Operand> for ExtensionObject[src]

impl PartialEq<ExtensionObject> for ExtensionObject[src]

impl Serialize for ExtensionObject[src]

impl StructuralPartialEq for ExtensionObject[src]

impl<'_> TryFrom<&'_ ExtensionObject> for Operand[src]

type Error = StatusCode

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

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

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

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

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

impl<T> From<T> for T[src]

impl<T, U> Into<U> 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, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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<V, T> VZip<V> for T where
    V: MultiLane<T>,