Luro02 / shorthand

A proc-macro to derive getter, setter and mut getter for structs in rust.
Apache License 2.0
6 stars 0 forks source link

relax format string of the rename attribute #4

Closed Luro02 closed 4 years ago

Luro02 commented 4 years ago

It should be possible to do this

#[derive(ShortHand)]
struct Example {
    #[shorthand(rename(get = "hello"))]
    field: String,
}

and

#[derive(ShortHand)]
struct Example {
    #[shorthand(rename(get = "hello_{}_{}"))]
    field: String,
}

It should also check for invalid characters, that can not be in a function name, like for example {, }, ; and so on...