Skip to content

Make DeviceType enum public #11

@JonathanAquino-NextRoll

Description

The DeviceType enum is something that would be handy for consumers to use, for example, to test if a user agent is a specific device type. However, it is private.

Repro steps

println!(
    "{:?}",
    rust_device_detector::parsers::device::DeviceType::Desktop
);

// Expected: The device type is printed.
// Actual: The following compilation error occurs:

module `device` is private
private modulerustc[Click for full compiler diagnostic](rust-analyzer-diagnostics-view:/diagnostic%20message%20[0]?0#file:///Users/jonaquino/projects/omnom-and-sludge/sludge/batch_jobs/src/uap.rs)
uap.rs(414, 64): unit variant `Desktop` is not publicly re-exported
parsers.rs(3, 1): the module `device` is defined here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions