Skip to content

feat(path): expose *Path-related utility functions - #349

Open
cartercanedy wants to merge 6 commits into
HMIProject:mainfrom
cartercanedy:cc/implement-rel-path-methods
Open

feat(path): expose *Path-related utility functions#349
cartercanedy wants to merge 6 commits into
HMIProject:mainfrom
cartercanedy:cc/implement-rel-path-methods

Conversation

@cartercanedy

@cartercanedy cartercanedy commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Closes #348

Implements UA_RelativePath factories/methods:

  • UA_RelativePath_parse -> ua::RelativePath::parse() -> Result<Self>
  • UA_RelativePath_print -> impl Display for ua::RelativePath

Accesser methods were also implemented.

@cartercanedy cartercanedy changed the title feat(relative path): expose *Path-related utility functions feat(path): expose *Path-related utility functions Jul 24, 2026
@cartercanedy

Copy link
Copy Markdown
Contributor Author

hey @sgoll @uklotzde friendly ping :)

@uklotzde uklotzde left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution and apologies for not responding promptly. Unfortunately we are currently very busy and didn't find the time for an in-depth review yet.

I left some initial comments.

/// See [UA_RelativePath_parse](https://open62541.org/doc/master/util.html#example-relativepaths) docs.
pub fn parse(path: &str) -> Result<Self, Error> {
let path = ua::String::new(path)?;
let mut slf = Self::init();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parsed_path would be a better name here instead of a cryptic abbreviation.

@@ -1,4 +1,11 @@
use crate::ua;
use std::fmt;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please group the imports consistently with the existing code in this crate.

"failed to print relative path: {status_code}"
);

write!(f, "{str}")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not str.fmt(f)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

{Browse,Relative}Path ergonomics

2 participants