pub struct RelativePathElement {
pub reference_type_id: NodeId,
pub is_inverse: bool,
pub include_subtypes: bool,
pub target_name: QualifiedName,
}Fields§
§reference_type_id: NodeId§is_inverse: bool§include_subtypes: bool§target_name: QualifiedNameImplementations§
Source§impl RelativePathElement
impl RelativePathElement
Sourcepub fn default_node_resolver(
namespace: u16,
browse_name: &str,
) -> Option<NodeId>
pub fn default_node_resolver( namespace: u16, browse_name: &str, ) -> Option<NodeId>
This is the default node resolver that attempts to resolve a browse name onto a reference type id. The default implementation resides in the types module so it doesn’t have access to the address space.
Therefore it makes a best guess by testing the browse name against the standard reference types and if fails to match it will produce a node id from the namespace and browse name.
pub fn default_browse_name_resolver(node_id: &NodeId) -> Option<String>
Sourcepub fn from_str<CB>(
path: &str,
node_resolver: &CB,
) -> Result<RelativePathElement, ()>
pub fn from_str<CB>( path: &str, node_resolver: &CB, ) -> Result<RelativePathElement, ()>
Parse a relative path element according to the OPC UA Part 4 Appendix A BNF
<relative-path> ::= <reference-type> <browse-name> [relative-path]
<reference-type> ::= '/' | '.' | '<' ['#'] ['!'] <browse-name> '>'
<browse-name> ::= [<namespace-index> ':'] <name>
<namespace-index> ::= <digit> [<digit>]
<digit> ::= '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
<name> ::= (<name-char> | '&' <reserved-char>) [<name>]
<reserved-char> ::= '/' | '.' | '<' | '>' | ':' | '#' | '!' | '&'
<name-char> ::= All valid characters for a String (see Part 3) excluding reserved-chars.
§Examples
/foo/0:foo.bar<0:HasEncoding>bar<!NonHierarchicalReferences>foo<#!2:MyReftype>2:blah
Trait Implementations§
Source§impl BinaryEncoder<RelativePathElement> for RelativePathElement
impl BinaryEncoder<RelativePathElement> for RelativePathElement
Source§fn byte_len(&self) -> usize
fn byte_len(&self) -> 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>(&self, stream: &mut S) -> EncodingResult<usize>
fn encode<S: Write>(&self, stream: &mut S) -> EncodingResult<usize>
Source§fn decode<S: Read>(
stream: &mut S,
decoding_options: &DecodingOptions,
) -> EncodingResult<Self>
fn decode<S: Read>( stream: &mut S, decoding_options: &DecodingOptions, ) -> EncodingResult<Self>
BadDecodingError as soon as possible.fn encode_to_vec(&self) -> Vec<u8> ⓘ
Source§impl Clone for RelativePathElement
impl Clone for RelativePathElement
Source§fn clone(&self) -> RelativePathElement
fn clone(&self) -> RelativePathElement
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RelativePathElement
impl Debug for RelativePathElement
Source§impl<'a> From<&'a RelativePathElement> for String
impl<'a> From<&'a RelativePathElement> for String
Source§fn from(element: &'a RelativePathElement) -> String
fn from(element: &'a RelativePathElement) -> String
Source§impl MessageInfo for RelativePathElement
impl MessageInfo for RelativePathElement
Source§impl PartialEq for RelativePathElement
impl PartialEq for RelativePathElement
Source§fn eq(&self, other: &RelativePathElement) -> bool
fn eq(&self, other: &RelativePathElement) -> bool
self and other values to be equal, and is used by ==.