Skip to content

Commit

Permalink
Add note about defaults and build_fn(skip) (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholastmosher committed Jan 12, 2021
1 parent 6842065 commit ea372ba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions derive_builder/src/lib.rs
Expand Up @@ -333,6 +333,9 @@
//! * Delegate to a private helper method on `FooBuilder` for anything fancy. This way
//! you will get _much better error diagnostics_ from the rust compiler and it will be _much
//! more readable_ for other human beings. :-)
//! * Defaults will not work while using `#[builder(build_fn(skip))]`. In this case, you'll
//! need to handle default values yourself when converting from the builder, such as by
//! using `.unwrap_or()` and `.unwrap_or_else()`.
//!
//! [`Default`]: https://doc.rust-lang.org/std/default/trait.Default.html
//!
Expand Down

0 comments on commit ea372ba

Please sign in to comment.