Skip to content

Support comparing UUri with URI strings #296

@sophokles73

Description

@sophokles73

In test cases (and maybe elsewhere) we often need to check, if a given UUri has the same properties as a given URI string. It is quite cumbersome to always invoke the corresponding transformer functions manually for that matter. It therefore seems reasonable to support direct comparison between UUris and URI strings at the language level by means of implementing the PartialEq trait accordingly.

That would allow us to do something like

let uuri = UUri {
            authority_name: "vin".into(),
            ue_id: 0x0000_8000,
            ue_version_major: 0x01,
            resource_id: 0x0002,
            ..Default::default()
        };
assert_eq!(uuri, "up://vin/8000/1/2");

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions