Skip to main content

NodeId

Struct 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

Source

pub fn new<T>(namespace: u16, value: T) -> NodeId
where T: Into<Identifier>,

Constructs a new NodeId from anything that can be turned into Identifier u32, Guid, ByteString or String

Source

pub fn root_folder_id() -> NodeId

Returns the node id for the root folder.

Source

pub fn objects_folder_id() -> NodeId

Returns the node id for the objects folder.

Source

pub fn types_folder_id() -> NodeId

Returns the node id for the types folder.

Source

pub fn views_folder_id() -> NodeId

Returns the node id for the views folder.

Source

pub fn is_null(&self) -> bool

Test if the node id is null, i.e. 0 namespace and 0 identifier

Source

pub fn null() -> NodeId

Returns a null node id

Source

pub fn next_numeric(namespace: u16) -> NodeId

Creates a numeric node id with an id incrementing up from 1000

Source

pub fn as_object_id(&self) -> Result<ObjectId, NodeIdError>

Extracts an ObjectId from a node id, providing the node id holds an object id

Source

pub fn as_variable_id(&self) -> Result<VariableId, NodeIdError>

Try to convert this to a builtin variable ID.

Source

pub fn as_reference_type_id(&self) -> Result<ReferenceTypeId, NodeIdError>

Try to convert this to a builtin reference type ID.

Source

pub fn as_data_type_id(&self) -> Result<DataTypeId, NodeIdError>

Try to convert this to a builtin data type ID.

Source

pub fn as_method_id(&self) -> Result<MethodId, NodeIdError>

Try to convert this to a builtin method ID.

Source

pub fn is_numeric(&self) -> bool

Test if the node id is numeric

Source

pub fn is_string(&self) -> bool

Test if the node id is a string

Source

pub fn is_guid(&self) -> bool

Test if the node id is a guid

Source

pub fn is_byte_string(&self) -> bool

Test if the node id us a byte string

Source

pub fn as_u32(&self) -> Option<u32>

Get the numeric value of this node ID if it is numeric.

Trait Implementations§

Source§

impl BinaryDecodable for NodeId

Source§

fn decode<S: Read + ?Sized>( stream: &mut S, ctx: &Context<'_>, ) -> EncodingResult<Self>

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.
Source§

impl BinaryEncodable for NodeId

Source§

fn byte_len(&self, ctx: &Context<'_>) -> 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: Write + ?Sized>( &self, stream: &mut S, ctx: &Context<'_>, ) -> EncodingResult<()>

Encodes the instance to the write stream.
Source§

fn override_encoding(&self) -> Option<BuiltInDataEncoding>

Override the extension object encoding used for this type. This only makes sense if the type can only ever be encoded using a single built-in encoding.
Source§

fn encode_to_vec(&self, ctx: &Context<'_>) -> Vec<u8>

Convenience method for encoding a message straight into an array of bytes. It is preferable to reuse buffers than to call this so it should be reserved for tests and trivial code.
Source§

impl Clone for NodeId

Source§

fn clone(&self) -> NodeId

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NodeId

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for NodeId

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for NodeId

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T> Equivalent<NodeId> for NodeIdRef<T>

Source§

fn equivalent(&self, key: &NodeId) -> bool

Compare self to key and return true if they are equal.
Source§

impl<'a> From<&'a DataTypeId> for NodeId

Source§

fn from(r: &'a DataTypeId) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a MethodId> for NodeId

Source§

fn from(r: &'a MethodId) -> Self

Converts to this type from the input type.
Source§

impl From<&NodeId> for ExpandedNodeId

Source§

fn from(value: &NodeId) -> Self

Converts to this type from the input type.
Source§

impl From<&NodeId> for NodeId

Source§

fn from(v: &NodeId) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a NodeId> for NodeIdRef<&'a Identifier>

Source§

fn from(value: &'a NodeId) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a NodeId> for ReadValueId

Source§

fn from(node_id: &'a NodeId) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a ObjectId> for NodeId

Source§

fn from(r: &'a ObjectId) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a ObjectTypeId> for NodeId

Source§

fn from(r: &'a ObjectTypeId) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a ReferenceTypeId> for NodeId

Source§

fn from(r: &'a ReferenceTypeId) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a VariableId> for NodeId

Source§

fn from(r: &'a VariableId) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a VariableTypeId> for NodeId

Source§

fn from(r: &'a VariableTypeId) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a str> for NodeId

Source§

fn from(value: &'a str) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<(u16, &'a str)> for NodeId

Source§

fn from(v: (u16, &'a str)) -> Self

Converts to this type from the input type.
Source§

impl From<(u16, ByteString)> for NodeId

Source§

fn from(v: (u16, ByteString)) -> Self

Converts to this type from the input type.
Source§

impl From<(u16, Guid)> for NodeId

Source§

fn from(v: (u16, Guid)) -> Self

Converts to this type from the input type.
Source§

impl From<(u16, UAString)> for NodeId

Source§

fn from(v: (u16, UAString)) -> Self

Converts to this type from the input type.
Source§

impl From<(u16, u32)> for NodeId

Source§

fn from(v: (u16, u32)) -> Self

Converts to this type from the input type.
Source§

impl From<ByteString> for NodeId

Source§

fn from(value: ByteString) -> Self

Converts to this type from the input type.
Source§

impl From<DataTypeId> for NodeId

Source§

fn from(r: DataTypeId) -> Self

Converts to this type from the input type.
Source§

impl From<Guid> for NodeId

Source§

fn from(value: Guid) -> Self

Converts to this type from the input type.
Source§

impl From<MethodId> for NodeId

Source§

fn from(r: MethodId) -> Self

Converts to this type from the input type.
Source§

impl From<NodeId> for DataValue

Source§

fn from(v: NodeId) -> Self

Converts to this type from the input type.
Source§

impl From<NodeId> for ExpandedNodeId

Source§

fn from(v: NodeId) -> Self

Converts to this type from the input type.
Source§

impl From<NodeId> for LiteralOperand

Source§

fn from(v: NodeId) -> Self

Converts to this type from the input type.
Source§

impl From<NodeId> for MonitoredItemCreateRequest

Source§

fn from(value: NodeId) -> Self

Converts to this type from the input type.
Source§

impl From<NodeId> for ReadValueId

Source§

fn from(node_id: NodeId) -> Self

Converts to this type from the input type.
Source§

impl From<NodeId> for String

Source§

fn from(value: NodeId) -> Self

Converts to this type from the input type.
Source§

impl From<ObjectId> for NodeId

Source§

fn from(r: ObjectId) -> Self

Converts to this type from the input type.
Source§

impl From<ObjectTypeId> for NodeId

Source§

fn from(r: ObjectTypeId) -> Self

Converts to this type from the input type.
Source§

impl From<ReferenceTypeId> for NodeId

Source§

fn from(r: ReferenceTypeId) -> Self

Converts to this type from the input type.
Source§

impl From<UAString> for NodeId

Source§

fn from(value: UAString) -> Self

Converts to this type from the input type.
Source§

impl From<VariableId> for NodeId

Source§

fn from(r: VariableId) -> Self

Converts to this type from the input type.
Source§

impl From<VariableTypeId> for NodeId

Source§

fn from(r: VariableTypeId) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for NodeId

Source§

fn from(value: u32) -> Self

Converts to this type from the input type.
Source§

impl FromStr for NodeId

Source§

type Err = StatusCode

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for NodeId

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<'a> IntoNodeIdRef<'a> for &'a NodeId

Source§

type TIdentifier = &'a Identifier

The inner identifier type.
Source§

fn into_node_id_ref(self) -> NodeIdRef<Self::TIdentifier>

Get a reference to this as a NodeIdRef.
Source§

impl IntoVariant for Box<NodeId>

Source§

fn into_variant(self) -> Variant

Convert self into a variant.
Source§

impl IntoVariant for NodeId

Source§

fn into_variant(self) -> Variant

Convert self into a variant.
Source§

impl JsonDecodable for NodeId

Source§

fn decode( stream: &mut JsonStreamReader<&mut dyn Read>, _ctx: &Context<'_>, ) -> EncodingResult<Self>

Decode Self from a JSON stream.
Source§

impl JsonEncodable for NodeId

Source§

fn encode( &self, stream: &mut JsonStreamWriter<&mut dyn Write>, ctx: &Context<'_>, ) -> EncodingResult<()>

Write the type to the provided JSON writer.
Source§

impl<T> PartialEq<&NodeId> for NodeIdRef<T>

Source§

fn eq(&self, other: &&NodeId) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<(u16, &[u8])> for NodeId

Source§

fn eq(&self, other: &(u16, &[u8])) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<(u16, &[u8; 16])> for NodeId

Source§

fn eq(&self, other: &(u16, &[u8; 16])) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<(u16, &str)> for NodeId

Source§

fn eq(&self, other: &(u16, &str)) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<(u16, u32)> for NodeId

Source§

fn eq(&self, other: &(u16, u32)) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<DataTypeId> for NodeId

Source§

fn eq(&self, other: &DataTypeId) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> PartialEq<NodeId> for NodeIdRef<T>

Source§

fn eq(&self, other: &NodeId) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> PartialEq<NodeIdRef<T>> for &NodeId

Source§

fn eq(&self, other: &NodeIdRef<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> PartialEq<NodeIdRef<T>> for NodeId

Source§

fn eq(&self, other: &NodeIdRef<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<ObjectId> for NodeId

Source§

fn eq(&self, other: &ObjectId) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<ObjectTypeId> for NodeId

Source§

fn eq(&self, other: &ObjectTypeId) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<ReferenceTypeId> for NodeId

Source§

fn eq(&self, other: &ReferenceTypeId) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<VariableId> for NodeId

Source§

fn eq(&self, other: &VariableId) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<VariableTypeId> for NodeId

Source§

fn eq(&self, other: &VariableTypeId) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for NodeId

Source§

fn eq(&self, other: &NodeId) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFrom<&NodeId> for VariantScalarTypeId

Source§

type Error = NodeIdError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &NodeId) -> Result<Self, NodeIdError>

Performs the conversion.
Source§

impl TryFrom<&NodeId> for VariantTypeId<'_>

Source§

type Error = NodeIdError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &NodeId) -> Result<Self, NodeIdError>

Performs the conversion.
Source§

impl TryFromVariant for NodeId

Source§

fn try_from_variant(v: Variant) -> Result<Self, Error>

Try to cast the given variant to this type.
Source§

impl UaNullable for NodeId

Source§

fn is_ua_null(&self) -> bool

Return true if this value is null, meaning it can be left out when being encoded in JSON and XML encodings.
Source§

impl VariantType for NodeId

Source§

fn variant_type_id() -> VariantScalarTypeId

The variant kind this type will be represented as.
Source§

impl XmlDecodable for NodeId

Source§

fn decode( read: &mut XmlStreamReader<&mut dyn Read>, context: &Context<'_>, ) -> Result<Self, Error>
where Self: Sized,

Decode a value from an XML stream.
Source§

impl XmlEncodable for NodeId

Source§

fn encode( &self, writer: &mut XmlStreamWriter<&mut dyn Write>, ctx: &Context<'_>, ) -> Result<(), Error>

Encode a value to an XML stream.
Source§

impl XmlType for NodeId

Source§

const TAG: &'static str = "NodeId"

The static fallback tag for this type. Convenience feature, but also used in nested types.
Source§

fn tag(&self) -> &str

The XML tag name for this type.
Source§

impl Eq for NodeId

Source§

impl StructuralPartialEq for NodeId

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> EventField for T
where T: IntoVariant + Clone,

Source§

fn get_value( &self, attribute_id: AttributeId, index_range: &NumericRange, remaining_path: &[QualifiedName], ) -> Variant

Get the variant representation of this field, using the given index range. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more