makeit icon indicating copy to clipboard operation
makeit copied to clipboard

Zero-overhead type-safe builder pattern `derive` macro for your Rust structs

Results 8 makeit issues
Sort by recently updated
recently updated
newest added

For example ```rust pub unsafe fn ptr_0(&mut self) -> *mut String { let inner = self.inner.as_mut_ptr(); &raw mut (*inner).a } ``` A reference in Rust gurantees that the memory is...

I'm using makeit heavily with props for a web framework, and currently when a prop is an `Option`, you have to write ``, but it would be much more desireable...

```rust #[derive(Builder, Debug)] struct Orange { a: String, b: String, } fn main() { let orange = Orange::builder() .set_a("xxx".into()) .set_b(panic!()) .build(); dbg!(orange); } ``` ``` cargo +nightly miri run The...

It looks like the generated code puts everything into a private module named after the builder type. For example, looking at the sample code from the README: ```rust use makeit::Builder;...

I love the idea of this crate for writing builder patterns, but I want the use of this crate to be transparent to end-users. The comments on the `Buildable` trait...

I would like to try using this crate without references to git. Are there any blockers for this?

Currently the only way to reassign an already initialized field is through a mutable pointer, under the assumption that assigning to the same field multiple times is a mistake, but...

The appropriate representation for `MaybeUninit` is [`[MaybeUninit; N]`](https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#initializing-an-array-element-by-element). An array specific builder should be created so that an uninitialized array isn't possible while also allowing piece-meal setting of their fields.