-
Notifications
You must be signed in to change notification settings - Fork 16
Add validty check function to UUri #210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add validty check function to UUri #210
Conversation
Added a function for checking if an existing UUri is a valid uProtocol URI.
|
@PLeVasseur is this what you need for uStreamer? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @sophokles73!
I think this is one half of what I was suggesting adding, please see comments for details.
| } | ||
| } | ||
|
|
||
| fn verify_major_version(major_version: u32) -> Result<u8, UUriError> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Yup, this is definitely one of the functions that'd be useful to have.
| /// ``` | ||
| pub fn check_validity(&self) -> Result<(), UUriError> { | ||
| Self::verify_authority(self.authority_name.as_str())?; | ||
| Self::verify_major_version(self.ue_version_major)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, absolutely. Don't know how that slipped through. Good that we do the reviews ... ;-)
|
@PLeVasseur I have added a corresponding check ... |
PLeVasseur
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Kai! LGTM

Added a function for checking if an existing UUri is a valid
uProtocol URI.
Addresses #209