Skip to content

with_prefix! Making the module public #327

@elpiel

Description

@elpiel

On a few occasions we have the same struct with the same prefix used in our applications. Currently the with_prefix creates a private module for serialize/deserialize and we have to do a hack in order to use the same prefix in other places and applications.

I'm opening this issue to see how this could be improved in future version.

// re-export the prefix module!
pub mod prefix_active {
    use serde_with::with_prefix;

    pub use prefix_active::*;

    with_prefix!(prefix_active "active_");
}

PS: Thank you all very much for creating and maintaining this crate!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions