pub struct ExpandedNodeId(/* private fields */);Expand description
Wrapper for
UA_ExpandedNodeId
from open62541_sys.
This owns the wrapped data. When the wrapper is dropped, the inner value is cleaned up
with UA_clear() to release dynamically allocated memory held by the value.
Implementations§
Source§impl ExpandedNodeId
impl ExpandedNodeId
Sourcepub fn new(node_id: NodeId, namespace_uri: String, server_index: u32) -> Self
pub fn new(node_id: NodeId, namespace_uri: String, server_index: u32) -> Self
Creates expanded node ID.
Constructs a new instance from parts by taking ownership.
§Example
use open62541::ua;
let node_id = ua::NodeId::numeric(1, 234);
let namespace_uri = ua::String::new("http://www.example.com").unwrap();
let server_index = 99;
let expanded_node_id = ua::ExpandedNodeId::new(
node_id.clone(),
namespace_uri.clone(),
server_index);
assert_eq!(expanded_node_id.node_id(), &node_id);
assert_eq!(expanded_node_id.namespace_uri(), &namespace_uri);
assert_eq!(expanded_node_id.server_index(), server_index);pub fn node_id(&self) -> &NodeId
pub fn namespace_uri(&self) -> &String
pub const fn server_index(&self) -> u32
Trait Implementations§
Source§impl Clone for ExpandedNodeId
impl Clone for ExpandedNodeId
Source§impl DataType for ExpandedNodeId
impl DataType for ExpandedNodeId
Source§type Inner = UA_ExpandedNodeId
type Inner = UA_ExpandedNodeId
Inner type. Read more
Source§unsafe fn from_raw(src: Self::Inner) -> Self
unsafe fn from_raw(src: Self::Inner) -> Self
Creates wrapper by taking ownership of value. Read more
Source§fn take_raw(src: &mut Self::Inner) -> Self
fn take_raw(src: &mut Self::Inner) -> Self
Creates wrapper by moving value from
src. Read moreSource§fn clone_into_raw(&self, dst: &mut Self::Inner)
fn clone_into_raw(&self, dst: &mut Self::Inner)
Clones value into
dst. Read moreSource§fn move_into_raw(self, dst: &mut Self::Inner)
fn move_into_raw(self, dst: &mut Self::Inner)
Moves value into
dst, giving up ownership. Read moreSource§unsafe fn to_raw_copy(this: &Self) -> Self::Inner
unsafe fn to_raw_copy(this: &Self) -> Self::Inner
Creates copy without giving up ownership. Read more
Source§unsafe fn as_mut(&mut self) -> &mut Self::Inner
unsafe fn as_mut(&mut self) -> &mut Self::Inner
Returns exclusive reference to value. Read more
Source§impl Debug for ExpandedNodeId
impl Debug for ExpandedNodeId
Source§impl Display for ExpandedNodeId
impl Display for ExpandedNodeId
Source§impl Drop for ExpandedNodeId
impl Drop for ExpandedNodeId
impl Eq for ExpandedNodeId
Source§impl From<NodeId> for ExpandedNodeId
impl From<NodeId> for ExpandedNodeId
Source§impl FromStr for ExpandedNodeId
impl FromStr for ExpandedNodeId
Source§fn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Parses expanded node ID from string.
§Examples
use open62541::ua;
// Valid expanded node IDs can be parsed.
let node_xid: ua::ExpandedNodeId = "nsu=urn:example.com:my-server;s=myVariable".parse().expect("should be valid expanded node ID");
assert_eq!(node_xid.to_string(), "nsu=urn:example.com:my-server;s=myVariable");
// Parsing expanded node IDs can fail.
"LoremIpsum".parse::<ua::ExpandedNodeId>().expect_err("should be invalid expanded node ID");Source§impl Ord for ExpandedNodeId
impl Ord for ExpandedNodeId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ExpandedNodeId
impl PartialEq for ExpandedNodeId
Source§impl PartialOrd for ExpandedNodeId
impl PartialOrd for ExpandedNodeId
impl Send for ExpandedNodeId
impl Sync for ExpandedNodeId
Auto Trait Implementations§
impl Freeze for ExpandedNodeId
impl RefUnwindSafe for ExpandedNodeId
impl Unpin for ExpandedNodeId
impl UnsafeUnpin for ExpandedNodeId
impl UnwindSafe for ExpandedNodeId
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<T> DataTypeExt for Twhere
T: DataType,
impl<T> DataTypeExt for Twhere
T: DataType,
Source§fn from_inner(value: <T as DataTypeExt>::Inner) -> Result<T, Error>
fn from_inner(value: <T as DataTypeExt>::Inner) -> Result<T, Error>
Creates instance for inner type. Read more
Source§fn into_inner(self) -> <T as DataTypeExt>::Inner
fn into_inner(self) -> <T as DataTypeExt>::Inner
Returns inner type representation.