Struct opcua_core::prelude::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
sourceimpl NodeId
impl NodeId
pub fn new<T>(namespace: u16, value: T) -> NodeId where
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
sourceimpl BinaryEncoder<NodeId> for NodeId
impl BinaryEncoder<NodeId> for NodeId
sourcefn 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. Read more
sourcefn 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.
sourcefn 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. Read more
fn encode_to_vec(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
sourceimpl<'de> Deserialize<'de> for NodeId
impl<'de> Deserialize<'de> for NodeId
sourcefn 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
sourceimpl<'a> From<&'a DataTypeId> for NodeId
impl<'a> From<&'a DataTypeId> for NodeId
sourcefn from(r: &'a DataTypeId) -> NodeId
fn from(r: &'a DataTypeId) -> NodeId
Converts to this type from the input type.
sourceimpl<'a> From<&'a NodeId> for ReadValueId
impl<'a> From<&'a NodeId> for ReadValueId
sourcefn from(node_id: &'a NodeId) -> ReadValueId
fn from(node_id: &'a NodeId) -> ReadValueId
Converts to this type from the input type.
sourceimpl<'a> From<&'a ObjectTypeId> for NodeId
impl<'a> From<&'a ObjectTypeId> for NodeId
sourcefn from(r: &'a ObjectTypeId) -> NodeId
fn from(r: &'a ObjectTypeId) -> NodeId
Converts to this type from the input type.
sourceimpl<'a> From<&'a ReferenceTypeId> for NodeId
impl<'a> From<&'a ReferenceTypeId> for NodeId
sourcefn from(r: &'a ReferenceTypeId) -> NodeId
fn from(r: &'a ReferenceTypeId) -> NodeId
Converts to this type from the input type.
sourceimpl<'a> From<&'a VariableId> for NodeId
impl<'a> From<&'a VariableId> for NodeId
sourcefn from(r: &'a VariableId) -> NodeId
fn from(r: &'a VariableId) -> NodeId
Converts to this type from the input type.
sourceimpl<'a> From<&'a VariableTypeId> for NodeId
impl<'a> From<&'a VariableTypeId> for NodeId
sourcefn from(r: &'a VariableTypeId) -> NodeId
fn from(r: &'a VariableTypeId) -> NodeId
Converts to this type from the input type.
sourceimpl From<NodeId> for ExpandedNodeId
impl From<NodeId> for ExpandedNodeId
sourcefn from(v: NodeId) -> ExpandedNodeId
fn from(v: NodeId) -> ExpandedNodeId
Converts to this type from the input type.
sourceimpl From<NodeId> for ReadValueId
impl From<NodeId> for ReadValueId
sourcefn from(node_id: NodeId) -> ReadValueId
fn from(node_id: NodeId) -> ReadValueId
Converts to this type from the input type.
sourceimpl<'a> Into<ExpandedNodeId> for &'a NodeId
impl<'a> Into<ExpandedNodeId> for &'a NodeId
sourcefn into(self) -> ExpandedNodeId
fn into(self) -> ExpandedNodeId
Converts this type into the (usually inferred) input type.
sourceimpl Into<MonitoredItemCreateRequest> for NodeId
impl Into<MonitoredItemCreateRequest> for NodeId
sourcefn into(self) -> MonitoredItemCreateRequest
fn into(self) -> MonitoredItemCreateRequest
Converts this type into the (usually inferred) input type.
sourceimpl Into<NodeId> for DataTypeId
impl Into<NodeId> for DataTypeId
sourceimpl Into<NodeId> for VariableTypeId
impl Into<NodeId> for VariableTypeId
sourceimpl Into<NodeId> for VariableId
impl Into<NodeId> for VariableId
sourceimpl Into<NodeId> for ObjectTypeId
impl Into<NodeId> for ObjectTypeId
sourceimpl Into<NodeId> for ReferenceTypeId
impl Into<NodeId> for ReferenceTypeId
sourceimpl Serialize for NodeId
impl Serialize for NodeId
sourcefn 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
sourceimpl<'_> TryFrom<&'_ NodeId> for VariantTypeId
impl<'_> TryFrom<&'_ NodeId> for VariantTypeId
impl Eq for NodeId
impl StructuralEq for NodeId
impl StructuralPartialEq for NodeId
Auto Trait Implementations
impl RefUnwindSafe for NodeId
impl Send for NodeId
impl Sync for NodeId
impl Unpin for NodeId
impl UnwindSafe for NodeId
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more