Skip to content

Crate API changes based on platform #7

@tazjin

Description

@tazjin

For some reason, in WebAssembly builds the fields of CountryCode become private and instead have getter methods (so instead of .name you have to use .name()). I thought I was going crazy for a while because this is obviously not visible in the docs!

Is there a reason for this? This means that if the same code using this library is used in a wasm and a native application, it has to be feature gated to access fields in a different way, or do some kind of workaround with maybe a trait over the CountryCode field.

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