Skip to content

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

@kimond

Description

@kimond

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions