Struct opcua_client::prelude::node_id::NodeId
source · pub struct NodeId {
pub namespace: u16,
pub identifier: Identifier,
}
Expand description
An identifier for a node in the address space of an OPC UA Server.
Fields§
§namespace: u16
The index for a namespace
identifier: Identifier
The identifier for the node in the address space
Implementations§
source§impl NodeId
impl NodeId
pub fn new<T>(namespace: u16, value: T) -> NodeIdwhere
T: 'static + Into<Identifier>,
pub fn next_numeric() -> NodeId
sourcepub fn as_object_id(&self) -> Result<ObjectId, ()>
pub fn as_object_id(&self) -> Result<ObjectId, ()>
Extracts an ObjectId from a node id, providing the node id holds an object id
pub fn as_reference_type_id(&self) -> Result<ReferenceTypeId, ()>
sourcepub fn is_numeric(&self) -> bool
pub fn is_numeric(&self) -> bool
Test if the node id is numeric
sourcepub fn is_byte_string(&self) -> bool
pub fn is_byte_string(&self) -> bool
Test if the node id us a byte string
Trait Implementations§
source§impl BinaryEncoder<NodeId> for NodeId
impl BinaryEncoder<NodeId> for NodeId
source§fn byte_len(&self) -> usize
fn byte_len(&self) -> usize
Returns the byte length of the structure. This calculation should be exact and as efficient
as possible. Read more
source§fn encode<S>(&self, stream: &mut S) -> Result<usize, StatusCode>where
S: Write,
fn encode<S>(&self, stream: &mut S) -> Result<usize, StatusCode>where
S: Write,
Encodes the instance to the write stream.
source§fn decode<S>(
stream: &mut S,
decoding_limits: &DecodingLimits
) -> Result<NodeId, StatusCode>where
S: Read,
fn decode<S>(
stream: &mut S,
decoding_limits: &DecodingLimits
) -> Result<NodeId, StatusCode>where
S: Read,
Decodes an instance from the read stream. The decoding limits are restrictions set by the server / client
on the length of strings, arrays etc. If these limits are exceeded the implementation should
return with a
BadDecodingError
as soon as possible. Read morefn to_vec(&self) -> Vec<u8, Global> ⓘ
source§impl<'de> Deserialize<'de> for NodeId
impl<'de> Deserialize<'de> for NodeId
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<NodeId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<NodeId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a> From<&'a NodeId> for ReadValueId
impl<'a> From<&'a NodeId> for ReadValueId
source§fn from(node_id: &'a NodeId) -> ReadValueId
fn from(node_id: &'a NodeId) -> ReadValueId
Converts to this type from the input type.
source§impl From<NodeId> for ExpandedNodeId
impl From<NodeId> for ExpandedNodeId
source§fn from(v: NodeId) -> ExpandedNodeId
fn from(v: NodeId) -> ExpandedNodeId
Converts to this type from the input type.
source§impl From<NodeId> for ReadValueId
impl From<NodeId> for ReadValueId
source§fn from(node_id: NodeId) -> ReadValueId
fn from(node_id: NodeId) -> ReadValueId
Converts to this type from the input type.
source§impl<'a> Into<ExpandedNodeId> for &'a NodeId
impl<'a> Into<ExpandedNodeId> for &'a NodeId
source§fn into(self) -> ExpandedNodeId
fn into(self) -> ExpandedNodeId
Converts this type into the (usually inferred) input type.
source§impl Into<NodeId> for DataTypeId
impl Into<NodeId> for DataTypeId
source§impl Into<NodeId> for ObjectTypeId
impl Into<NodeId> for ObjectTypeId
source§impl Into<NodeId> for ReferenceTypeId
impl Into<NodeId> for ReferenceTypeId
source§impl Into<NodeId> for VariableId
impl Into<NodeId> for VariableId
source§impl Into<NodeId> for VariableTypeId
impl Into<NodeId> for VariableTypeId
source§impl Serialize for NodeId
impl Serialize for NodeId
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more