Skip to content

Consider UUri::try_from_parts_expanded_ue_id() #273

@PLeVasseur

Description

@PLeVasseur

It might be nice to have a version of UUri::try_from_parts() that accepts ue_type and ue_instance as two separate parameters to avoid the kinds of bit shifting and or'ing seen here:

fn test_uri(authority: &str, instance: u16, typ: u16, version: u8, resource: u16) -> UUri {
    let entity_id = ((instance as u32) << 16) | (typ as u32);
    UUri::try_from_parts(authority, entity_id, version, resource).unwrap()
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions