#[repr(u32)]pub enum VariantScalarTypeId {
Show 25 variants
Boolean = 1,
SByte = 2,
Byte = 3,
Int16 = 4,
UInt16 = 5,
Int32 = 6,
UInt32 = 7,
Int64 = 8,
UInt64 = 9,
Float = 10,
Double = 11,
String = 12,
DateTime = 13,
Guid = 14,
ByteString = 15,
XmlElement = 16,
NodeId = 17,
ExpandedNodeId = 18,
StatusCode = 19,
QualifiedName = 20,
LocalizedText = 21,
ExtensionObject = 22,
DataValue = 23,
Variant = 24,
DiagnosticInfo = 25,
}Expand description
The scalar type of a variant.
Variants§
Boolean = 1
Boolean
SByte = 2
Signed byte
Byte = 3
Unsigned byte
Int16 = 4
Signed 16 bit integer
UInt16 = 5
Unsigned 16 bit integer
Int32 = 6
Signed 32 bit integer
UInt32 = 7
Unsigned 32 bit integer
Int64 = 8
Signed 64 bit integer
UInt64 = 9
Unsigned 64 bit integer
Float = 10
32 bit floating point number
Double = 11
64 bit floating point number
String = 12
String
DateTime = 13
Datetime
Guid = 14
Globally unique ID
ByteString = 15
Byte string
XmlElement = 16
XmlElement
NodeId = 17
Node ID
ExpandedNodeId = 18
Expanded node ID
StatusCode = 19
Status code
QualifiedName = 20
Qualified name
LocalizedText = 21
Localized text
ExtensionObject = 22
Extension object, containing some dynamic structure.
DataValue = 23
Data value
Variant = 24
A nested variant.
DiagnosticInfo = 25
Diagnostic info
Implementations§
Source§impl VariantScalarTypeId
impl VariantScalarTypeId
Sourcepub fn encoding_mask(&self) -> u8
pub fn encoding_mask(&self) -> u8
Get the encoding mask corresponding to this type ID.
Sourcepub fn from_encoding_mask(encoding_mask: u8) -> Option<VariantScalarTypeId>
pub fn from_encoding_mask(encoding_mask: u8) -> Option<VariantScalarTypeId>
Try to get a scalar type from the encoding mask.
Sourcepub fn is_numeric(&self) -> bool
pub fn is_numeric(&self) -> bool
Tests and returns true if the variant holds a numeric type
Sourcepub fn precedence(&self) -> u8
pub fn precedence(&self) -> u8
Returns a data precedence rank for scalar types, OPC UA part 4 table 119. This is used when operators are comparing values of differing types. The type with the highest precedence dictates how values are converted in order to be compared.
Source§impl VariantScalarTypeId
impl VariantScalarTypeId
Sourcepub fn from_xml_name(name: &str) -> Option<VariantScalarTypeId>
pub fn from_xml_name(name: &str) -> Option<VariantScalarTypeId>
Get a variant type ID from the XML name of the variant type.
Trait Implementations§
Source§impl Clone for VariantScalarTypeId
impl Clone for VariantScalarTypeId
Source§fn clone(&self) -> VariantScalarTypeId
fn clone(&self) -> VariantScalarTypeId
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more