Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow custom Models in derive macro #8

Open
danieleades opened this issue Aug 7, 2022 · 0 comments
Open

allow custom Models in derive macro #8

danieleades opened this issue Aug 7, 2022 · 0 comments

Comments

@danieleades
Copy link
Owner

users should be able to use a custom model when using the derive macro.

something like this-

use minnow::Encodeable;

#[derive(Debug, Encodeable)]
pub struct Coordinates {
    #[encode(float(min = -10_000.0, max = 10_000.0, precision = 1))]
    pub x: f64,
    #[encode(model = MyCustomModel)]
    pub y: f64,
    #[encode(float(min = -5_000.0, max = 0.0, precision = 0))]
    pub z: f64,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant