Enum opcua_types::Variant [] [src]

pub enum Variant {
    Empty,
    Boolean(Boolean),
    SByte(SByte),
    Byte(Byte),
    Int16(Int16),
    UInt16(UInt16),
    Int32(Int32),
    UInt32(UInt32),
    Int64(Int64),
    UInt64(UInt64),
    Float(Float),
    Double(Double),
    String(UAString),
    DateTime(DateTime),
    Guid(Guid),
    StatusCode(StatusCode),
    ByteString(ByteString),
    XmlElement(XmlElement),
    QualifiedName(Box<QualifiedName>),
    LocalizedText(Box<LocalizedText>),
    NodeId(Box<NodeId>),
    ExpandedNodeId(Box<ExpandedNodeId>),
    ExtensionObject(Box<ExtensionObject>),
    DataValue(Box<DataValue>),
    Array(Box<Vec<Variant>>),
    MultiDimensionArray(Box<MultiDimensionArray>),
}

A Variant holds all primitive types, including single and multi dimensional arrays and data values. Boxes are used for more complex types to keep the size of this enum down a bit.

Variants

Empty type has no value

Boolean

Signed byte

Unsigned byte

Signed 16-bit int

Unsigned 16-bit int

Signed 32-bit int

Unsigned 32-bit int

Signed 64-bit int

Unsigned 64-bit int

Float

Double

String

DateTime

Guid

StatusCode

ByteString

XmlElement

QualifiedName

LocalizedText

NodeId

ExpandedNodeId

ExtensionObject

DataValue (boxed because a DataValue itself holds a Variant)

Single dimension array A variant can be an array of other kinds (all of which must be the same type), second argument is the dimensions of the array which should match the array length, otherwise BAD_DECODING_ERROR

Multi dimension array A variant can be an array of other kinds (all of which must be the same type), second argument is the dimensions of the array which should match the array length, otherwise BAD_DECODING_ERROR Higher rank dimensions are serialized first. For example an array with dimensions [2,2,2] is written in this order: [0,0,0], [0,0,1], [0,1,0], [0,1,1], [1,0,0], [1,0,1], [1,1,0], [1,1,1]

Methods

impl Variant
[src]

Test the flag (convenience method)

Tests and returns true if the variant holds a numeric type

Converts the numeric type to a double or returns None

Trait Implementations

impl PartialEq for Variant
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for Variant
[src]

Formats the value using the given formatter.

impl Clone for Variant
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl BinaryEncoder<Variant> for Variant
[src]

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

Encodes the instance to the write stream.

Decodes an instance from the read stream.