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
Sourcepub fn new<T>(namespace: u16, value: T) -> NodeIdwhere
T: Into<Identifier>,
pub fn new<T>(namespace: u16, value: T) -> NodeIdwhere
T: Into<Identifier>,
Constructs a new NodeId from anything that can be turned into Identifier u32, Guid, ByteString or String
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.
Sourcepub fn next_numeric(namespace: u16) -> NodeId
pub fn next_numeric(namespace: u16) -> NodeId
Creates a numeric node id with an id incrementing up from 1000
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
Sourcepub fn as_variable_id(&self) -> Result<VariableId, NodeIdError>
pub fn as_variable_id(&self) -> Result<VariableId, NodeIdError>
Try to convert this to a builtin variable ID.
Sourcepub fn as_reference_type_id(&self) -> Result<ReferenceTypeId, NodeIdError>
pub fn as_reference_type_id(&self) -> Result<ReferenceTypeId, NodeIdError>
Try to convert this to a builtin reference type ID.
Sourcepub fn as_data_type_id(&self) -> Result<DataTypeId, NodeIdError>
pub fn as_data_type_id(&self) -> Result<DataTypeId, NodeIdError>
Try to convert this to a builtin data type ID.
Sourcepub fn as_method_id(&self) -> Result<MethodId, NodeIdError>
pub fn as_method_id(&self) -> Result<MethodId, NodeIdError>
Try to convert this to a builtin method ID.
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 BinaryDecodable for NodeId
impl BinaryDecodable for NodeId
Source§fn decode<S: Read + ?Sized>(
stream: &mut S,
ctx: &Context<'_>,
) -> EncodingResult<Self>
fn decode<S: Read + ?Sized>( stream: &mut S, ctx: &Context<'_>, ) -> EncodingResult<Self>
BadDecodingError as soon as possible.Source§impl BinaryEncodable for NodeId
impl BinaryEncodable for NodeId
Source§fn byte_len(&self, ctx: &Context<'_>) -> usize
fn byte_len(&self, ctx: &Context<'_>) -> usize
encode were called.
This may be called prior to writing to ensure the correct amount of space is available.Source§fn encode<S: Write + ?Sized>(
&self,
stream: &mut S,
ctx: &Context<'_>,
) -> EncodingResult<()>
fn encode<S: Write + ?Sized>( &self, stream: &mut S, ctx: &Context<'_>, ) -> EncodingResult<()>
Source§fn override_encoding(&self) -> Option<BuiltInDataEncoding>
fn override_encoding(&self) -> Option<BuiltInDataEncoding>
Source§impl<T> Equivalent<NodeId> for NodeIdRef<T>
impl<T> Equivalent<NodeId> for NodeIdRef<T>
Source§fn equivalent(&self, key: &NodeId) -> bool
fn equivalent(&self, key: &NodeId) -> bool
key and return true if they are equal.Source§impl<'a> From<&'a DataTypeId> for NodeId
impl<'a> From<&'a DataTypeId> for NodeId
Source§fn from(r: &'a DataTypeId) -> Self
fn from(r: &'a DataTypeId) -> Self
Source§impl From<&NodeId> for ExpandedNodeId
impl From<&NodeId> for ExpandedNodeId
Source§impl<'a> From<&'a NodeId> for ReadValueId
impl<'a> From<&'a NodeId> for ReadValueId
Source§impl<'a> From<&'a ObjectTypeId> for NodeId
impl<'a> From<&'a ObjectTypeId> for NodeId
Source§fn from(r: &'a ObjectTypeId) -> Self
fn from(r: &'a ObjectTypeId) -> Self
Source§impl<'a> From<&'a ReferenceTypeId> for NodeId
impl<'a> From<&'a ReferenceTypeId> for NodeId
Source§fn from(r: &'a ReferenceTypeId) -> Self
fn from(r: &'a ReferenceTypeId) -> Self
Source§impl<'a> From<&'a VariableId> for NodeId
impl<'a> From<&'a VariableId> for NodeId
Source§fn from(r: &'a VariableId) -> Self
fn from(r: &'a VariableId) -> Self
Source§impl<'a> From<&'a VariableTypeId> for NodeId
impl<'a> From<&'a VariableTypeId> for NodeId
Source§fn from(r: &'a VariableTypeId) -> Self
fn from(r: &'a VariableTypeId) -> Self
Source§impl From<(u16, ByteString)> for NodeId
impl From<(u16, ByteString)> for NodeId
Source§fn from(v: (u16, ByteString)) -> Self
fn from(v: (u16, ByteString)) -> Self
Source§impl From<ByteString> for NodeId
impl From<ByteString> for NodeId
Source§fn from(value: ByteString) -> Self
fn from(value: ByteString) -> Self
Source§impl From<DataTypeId> for NodeId
impl From<DataTypeId> for NodeId
Source§fn from(r: DataTypeId) -> Self
fn from(r: DataTypeId) -> Self
Source§impl From<NodeId> for ExpandedNodeId
impl From<NodeId> for ExpandedNodeId
Source§impl From<NodeId> for LiteralOperand
impl From<NodeId> for LiteralOperand
Source§impl From<NodeId> for MonitoredItemCreateRequest
impl From<NodeId> for MonitoredItemCreateRequest
Source§impl From<NodeId> for ReadValueId
impl From<NodeId> for ReadValueId
Source§impl From<ObjectTypeId> for NodeId
impl From<ObjectTypeId> for NodeId
Source§fn from(r: ObjectTypeId) -> Self
fn from(r: ObjectTypeId) -> Self
Source§impl From<ReferenceTypeId> for NodeId
impl From<ReferenceTypeId> for NodeId
Source§fn from(r: ReferenceTypeId) -> Self
fn from(r: ReferenceTypeId) -> Self
Source§impl From<VariableId> for NodeId
impl From<VariableId> for NodeId
Source§fn from(r: VariableId) -> Self
fn from(r: VariableId) -> Self
Source§impl From<VariableTypeId> for NodeId
impl From<VariableTypeId> for NodeId
Source§fn from(r: VariableTypeId) -> Self
fn from(r: VariableTypeId) -> Self
Source§impl<'a> IntoNodeIdRef<'a> for &'a NodeId
impl<'a> IntoNodeIdRef<'a> for &'a NodeId
Source§type TIdentifier = &'a Identifier
type TIdentifier = &'a Identifier
Source§fn into_node_id_ref(self) -> NodeIdRef<Self::TIdentifier>
fn into_node_id_ref(self) -> NodeIdRef<Self::TIdentifier>
NodeIdRef.Source§impl IntoVariant for Box<NodeId>
impl IntoVariant for Box<NodeId>
Source§fn into_variant(self) -> Variant
fn into_variant(self) -> Variant
Source§impl IntoVariant for NodeId
impl IntoVariant for NodeId
Source§fn into_variant(self) -> Variant
fn into_variant(self) -> Variant
Source§impl JsonDecodable for NodeId
impl JsonDecodable for NodeId
Source§fn decode(
stream: &mut JsonStreamReader<&mut dyn Read>,
_ctx: &Context<'_>,
) -> EncodingResult<Self>
fn decode( stream: &mut JsonStreamReader<&mut dyn Read>, _ctx: &Context<'_>, ) -> EncodingResult<Self>
Source§impl JsonEncodable for NodeId
impl JsonEncodable for NodeId
Source§fn encode(
&self,
stream: &mut JsonStreamWriter<&mut dyn Write>,
ctx: &Context<'_>,
) -> EncodingResult<()>
fn encode( &self, stream: &mut JsonStreamWriter<&mut dyn Write>, ctx: &Context<'_>, ) -> EncodingResult<()>
Source§impl PartialEq<DataTypeId> for NodeId
impl PartialEq<DataTypeId> for NodeId
Source§impl PartialEq<ObjectTypeId> for NodeId
impl PartialEq<ObjectTypeId> for NodeId
Source§impl PartialEq<ReferenceTypeId> for NodeId
impl PartialEq<ReferenceTypeId> for NodeId
Source§impl PartialEq<VariableId> for NodeId
impl PartialEq<VariableId> for NodeId
Source§impl PartialEq<VariableTypeId> for NodeId
impl PartialEq<VariableTypeId> for NodeId
Source§impl TryFrom<&NodeId> for VariantScalarTypeId
impl TryFrom<&NodeId> for VariantScalarTypeId
Source§type Error = NodeIdError
type Error = NodeIdError
Source§impl TryFrom<&NodeId> for VariantTypeId<'_>
impl TryFrom<&NodeId> for VariantTypeId<'_>
Source§type Error = NodeIdError
type Error = NodeIdError
Source§impl TryFromVariant for NodeId
impl TryFromVariant for NodeId
Source§impl UaNullable for NodeId
impl UaNullable for NodeId
Source§fn is_ua_null(&self) -> bool
fn is_ua_null(&self) -> bool
Source§impl VariantType for NodeId
impl VariantType for NodeId
Source§fn variant_type_id() -> VariantScalarTypeId
fn variant_type_id() -> VariantScalarTypeId
Source§impl XmlDecodable for NodeId
impl XmlDecodable for NodeId
Source§impl XmlEncodable for NodeId
impl XmlEncodable for NodeId
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 UnsafeUnpin 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
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
key and return true if they are equal.