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: 'static + Into<Identifier>,

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

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_reference_type_id(&self) -> Result<ReferenceTypeId, NodeIdError>

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

Trait Implementations§

Source§

impl BinaryEncoder<NodeId> for NodeId

Source§

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,

Encodes the instance to the write stream.
Source§

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

fn encode_to_vec(&self) -> Vec<u8>

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<(), Error>

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

impl Default for NodeId

Source§

fn default() -> NodeId

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

impl<'de> Deserialize<'de> for NodeId

Source§

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 Display for NodeId

Source§

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

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

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

Source§

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

Converts to this type from the input type.
Source§

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

Source§

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

Converts to this type from the input type.
Source§

impl From<&NodeId> for NodeId

Source§

fn from(v: &NodeId) -> NodeId

Converts to this type from the input type.
Source§

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

Source§

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

Converts to this type from the input type.
Source§

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

Source§

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

Converts to this type from the input type.
Source§

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

Source§

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

Converts to this type from the input type.
Source§

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

Source§

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

Converts to this type from the input type.
Source§

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

Source§

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

Converts to this type from the input type.
Source§

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

Source§

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

Converts to this type from the input type.
Source§

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

Source§

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

Converts to this type from the input type.
Source§

impl From<(u16, ByteString)> for NodeId

Source§

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

Converts to this type from the input type.
Source§

impl From<(u16, Guid)> for NodeId

Source§

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

Converts to this type from the input type.
Source§

impl From<(u16, UAString)> for NodeId

Source§

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

Converts to this type from the input type.
Source§

impl From<(u16, u32)> for NodeId

Source§

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

Converts to this type from the input type.
Source§

impl From<NodeId> for DataValue

Source§

fn from(v: NodeId) -> DataValue

Converts to this type from the input type.
Source§

impl From<NodeId> for ExpandedNodeId

Source§

fn from(v: NodeId) -> ExpandedNodeId

Converts to this type from the input type.
Source§

impl From<NodeId> for ReadValueId

Source§

fn from(node_id: NodeId) -> ReadValueId

Converts to this type from the input type.
Source§

impl From<NodeId> for Variant

Source§

fn from(v: NodeId) -> Variant

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<NodeId, <NodeId as FromStr>::Err>

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

impl Hash for NodeId

Source§

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

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> Into<ExpandedNodeId> for &'a NodeId

Source§

fn into(self) -> ExpandedNodeId

Converts this type into the (usually inferred) input type.
Source§

impl Into<MonitoredItemCreateRequest> for NodeId

Source§

fn into(self) -> MonitoredItemCreateRequest

Converts this type into the (usually inferred) input type.
Source§

impl Into<NodeId> for DataTypeId

Source§

fn into(self) -> NodeId

Converts this type into the (usually inferred) input type.
Source§

impl Into<NodeId> for MethodId

Source§

fn into(self) -> NodeId

Converts this type into the (usually inferred) input type.
Source§

impl Into<NodeId> for ObjectId

Source§

fn into(self) -> NodeId

Converts this type into the (usually inferred) input type.
Source§

impl Into<NodeId> for ObjectTypeId

Source§

fn into(self) -> NodeId

Converts this type into the (usually inferred) input type.
Source§

impl Into<NodeId> for ReferenceTypeId

Source§

fn into(self) -> NodeId

Converts this type into the (usually inferred) input type.
Source§

impl Into<NodeId> for VariableId

Source§

fn into(self) -> NodeId

Converts this type into the (usually inferred) input type.
Source§

impl Into<NodeId> for VariableTypeId

Source§

fn into(self) -> NodeId

Converts this type into the (usually inferred) input type.
Source§

impl Into<String> for NodeId

Source§

fn into(self) -> String

Converts this type into the (usually inferred) input type.
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 Serialize for NodeId

Source§

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

Source§

type Error = ()

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

fn try_from( value: &NodeId, ) -> Result<VariantTypeId, <VariantTypeId as TryFrom<&NodeId>>::Error>

Performs the conversion.
Source§

impl Eq for NodeId

Source§

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> 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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,