pub struct RelativePathElement {
pub reference_type_id: NodeId,
pub is_inverse: bool,
pub include_subtypes: bool,
pub target_name: QualifiedName,
}Expand description
https://reference.opcfoundation.org/v105/Core/docs/Part4/7.31
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.
Sourcepub fn from_str<CB>(
path: &str,
node_resolver: &CB,
) -> Result<RelativePathElement, RelativePathError>
pub fn from_str<CB>( path: &str, node_resolver: &CB, ) -> Result<RelativePathElement, RelativePathError>
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 BinaryDecodable for RelativePathElement
impl BinaryDecodable for RelativePathElement
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 RelativePathElement
impl BinaryEncodable for RelativePathElement
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 Clone for RelativePathElement
impl Clone for RelativePathElement
Source§fn clone(&self) -> RelativePathElement
fn clone(&self) -> RelativePathElement
1.0.0 · 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 Default for RelativePathElement
impl Default for RelativePathElement
Source§fn default() -> RelativePathElement
fn default() -> 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 JsonDecodable for RelativePathElement
impl JsonDecodable for RelativePathElement
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 RelativePathElement
impl JsonEncodable for RelativePathElement
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 MessageInfo for RelativePathElement
impl MessageInfo for RelativePathElement
Source§fn json_type_id(&self) -> ObjectId
fn json_type_id(&self) -> ObjectId
Source§fn xml_type_id(&self) -> ObjectId
fn xml_type_id(&self) -> ObjectId
Source§fn data_type_id(&self) -> DataTypeId
fn data_type_id(&self) -> DataTypeId
Source§impl PartialEq for RelativePathElement
impl PartialEq for RelativePathElement
Source§impl UaNullable for RelativePathElement
impl UaNullable for RelativePathElement
Source§fn is_ua_null(&self) -> bool
fn is_ua_null(&self) -> bool
Source§impl XmlDecodable for RelativePathElement
impl XmlDecodable for RelativePathElement
Source§fn decode(
stream: &mut XmlStreamReader<&mut dyn Read>,
ctx: &Context<'_>,
) -> EncodingResult<Self>
fn decode( stream: &mut XmlStreamReader<&mut dyn Read>, ctx: &Context<'_>, ) -> EncodingResult<Self>
Source§impl XmlEncodable for RelativePathElement
impl XmlEncodable for RelativePathElement
Source§fn encode(
&self,
stream: &mut XmlStreamWriter<&mut dyn Write>,
ctx: &Context<'_>,
) -> EncodingResult<()>
fn encode( &self, stream: &mut XmlStreamWriter<&mut dyn Write>, ctx: &Context<'_>, ) -> EncodingResult<()>
Source§impl XmlType for RelativePathElement
impl XmlType for RelativePathElement
impl StructuralPartialEq for RelativePathElement
Auto Trait Implementations§
impl Freeze for RelativePathElement
impl RefUnwindSafe for RelativePathElement
impl Send for RelativePathElement
impl Sync for RelativePathElement
impl Unpin for RelativePathElement
impl UnwindSafe for RelativePathElement
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<T> DynEncodable for Twhere
T: BinaryEncodable + JsonEncodable + XmlEncodable + ExpandedMessageInfo + Any + Debug + Send + Sync + Clone + PartialEq,
impl<T> DynEncodable for Twhere
T: BinaryEncodable + JsonEncodable + XmlEncodable + ExpandedMessageInfo + Any + Debug + Send + Sync + Clone + PartialEq,
Source§fn encode_binary(
&self,
stream: &mut dyn Write,
ctx: &Context<'_>,
) -> Result<(), Error>
fn encode_binary( &self, stream: &mut dyn Write, ctx: &Context<'_>, ) -> Result<(), Error>
Source§fn encode_json(
&self,
stream: &mut JsonStreamWriter<&mut dyn Write>,
ctx: &Context<'_>,
) -> Result<(), Error>
fn encode_json( &self, stream: &mut JsonStreamWriter<&mut dyn Write>, ctx: &Context<'_>, ) -> Result<(), Error>
Source§fn encode_xml(
&self,
stream: &mut XmlStreamWriter<&mut dyn Write>,
ctx: &Context<'_>,
) -> Result<(), Error>
fn encode_xml( &self, stream: &mut XmlStreamWriter<&mut dyn Write>, ctx: &Context<'_>, ) -> Result<(), Error>
Source§fn xml_tag_name(&self) -> &str
fn xml_tag_name(&self) -> &str
Source§fn byte_len_dyn(&self, ctx: &Context<'_>) -> usize
fn byte_len_dyn(&self, ctx: &Context<'_>) -> usize
Source§fn binary_type_id(&self) -> ExpandedNodeId
fn binary_type_id(&self) -> ExpandedNodeId
Source§fn json_type_id(&self) -> ExpandedNodeId
fn json_type_id(&self) -> ExpandedNodeId
Source§fn xml_type_id(&self) -> ExpandedNodeId
fn xml_type_id(&self) -> ExpandedNodeId
Source§fn data_type_id(&self) -> ExpandedNodeId
fn data_type_id(&self) -> ExpandedNodeId
Source§fn as_dyn_any(self: Box<T>) -> Box<dyn Any + Sync + Send>
fn as_dyn_any(self: Box<T>) -> Box<dyn Any + Sync + Send>
Source§fn as_dyn_any_ref(&self) -> &(dyn Any + Sync + Send + 'static)
fn as_dyn_any_ref(&self) -> &(dyn Any + Sync + Send + 'static)
Source§fn clone_box(&self) -> Box<dyn DynEncodable>
fn clone_box(&self) -> Box<dyn DynEncodable>
Source§fn dyn_eq(&self, other: &(dyn DynEncodable + 'static)) -> bool
fn dyn_eq(&self, other: &(dyn DynEncodable + 'static)) -> bool
Self.Source§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
std::any::type_name on Self.
Very useful for debugging.