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

Use fake-rs to generate random value on struct creation #2

Open
kimond opened this issue Apr 19, 2018 · 0 comments
Open

Use fake-rs to generate random value on struct creation #2

kimond opened this issue Apr 19, 2018 · 0 comments

Comments

@kimond
Copy link
Owner

kimond commented Apr 19, 2018

The lib https://github.com/cksac/fake-rs would be interesting to provide fake data through attributes.
example:

#[derive(
struct MyModel {
    #[facto(fake="first_name")]
    name: String,
    age: u8,
    height: f32,
}

In the example above, the attribute fake="first_name" would use the fake-rs fake name generation.

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