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: u16The index for a namespace
identifier: IdentifierThe 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>,
Sourcepub fn root_folder_id() -> NodeId
pub fn root_folder_id() -> NodeId
Returns the node id for the root folder.
Sourcepub fn objects_folder_id() -> NodeId
pub fn objects_folder_id() -> NodeId
Returns the node id for the objects folder.
Sourcepub fn types_folder_id() -> NodeId
pub fn types_folder_id() -> NodeId
Returns the node id for the types folder.
Sourcepub fn views_folder_id() -> NodeId
pub fn views_folder_id() -> NodeId
Returns the node id for the views folder.
pub fn next_numeric(namespace: u16) -> NodeId
Sourcepub fn as_object_id(&self) -> Result<ObjectId, NodeIdError>
pub fn as_object_id(&self) -> Result<ObjectId, NodeIdError>
Extracts an ObjectId from a node id, providing the node id holds an object id
pub fn as_reference_type_id(&self) -> Result<ReferenceTypeId, NodeIdError>
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 exact byte length of the structure as it would be if
encode were called.
This may be called prior to writing to ensure the correct amount of space is available.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_options: &DecodingOptions,
) -> Result<NodeId, StatusCode>where
S: Read,
fn decode<S>(
stream: &mut S,
decoding_options: &DecodingOptions,
) -> Result<NodeId, StatusCode>where
S: Read,
Decodes an instance from the read stream. The decoding options contains 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.fn encode_to_vec(&self) -> Vec<u8> ⓘ
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 DataTypeId> for NodeId
impl<'a> From<&'a DataTypeId> for NodeId
Source§fn from(r: &'a DataTypeId) -> NodeId
fn from(r: &'a DataTypeId) -> NodeId
Converts to this type from the input type.
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<'a> From<&'a ObjectTypeId> for NodeId
impl<'a> From<&'a ObjectTypeId> for NodeId
Source§fn from(r: &'a ObjectTypeId) -> NodeId
fn from(r: &'a ObjectTypeId) -> NodeId
Converts to this type from the input type.
Source§impl<'a> From<&'a ReferenceTypeId> for NodeId
impl<'a> From<&'a ReferenceTypeId> for NodeId
Source§fn from(r: &'a ReferenceTypeId) -> NodeId
fn from(r: &'a ReferenceTypeId) -> NodeId
Converts to this type from the input type.
Source§impl<'a> From<&'a VariableId> for NodeId
impl<'a> From<&'a VariableId> for NodeId
Source§fn from(r: &'a VariableId) -> NodeId
fn from(r: &'a VariableId) -> NodeId
Converts to this type from the input type.
Source§impl<'a> From<&'a VariableTypeId> for NodeId
impl<'a> From<&'a VariableTypeId> for NodeId
Source§fn from(r: &'a VariableTypeId) -> NodeId
fn from(r: &'a VariableTypeId) -> NodeId
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<MonitoredItemCreateRequest> for NodeId
impl Into<MonitoredItemCreateRequest> for NodeId
Source§fn into(self) -> MonitoredItemCreateRequest
fn into(self) -> MonitoredItemCreateRequest
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
Source§impl TryFrom<&NodeId> for VariantTypeId
impl TryFrom<&NodeId> for VariantTypeId
impl Eq for NodeId
impl StructuralPartialEq for NodeId
Auto Trait Implementations§
impl Freeze for NodeId
impl RefUnwindSafe for NodeId
impl Send for NodeId
impl Sync for NodeId
impl Unpin for NodeId
impl UnwindSafe for NodeId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.