Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
maccesch committed Jun 24, 2023
1 parent bdad4fd commit ab81473
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,19 @@ fn main() {
}
```

In cases where you don't want a generic field to be able to change the generic type you
can annotate it with `keep_type`.

```rust
#[derive(DefaultBuilder)]
struct SomeOptions<T> {
#[builder(keep_type)]
the_field: T,
}
```

this will generate a standard builder method as if `T` wasn't generic.

### Related Work

For more general purposes please check out the much more powerful
Expand Down

0 comments on commit ab81473

Please sign in to comment.