derive_more
derive_more copied to clipboard
Some more derive(Trait) options
I'm not sure if this is just a configuration issue on my end, but `rust-analyzer` seems convinced that the only version of traits like `Display` or `Into` come from this...
``` rust // Working #[derive(Display)] #[display(fmt = "A")] struct A; #[derive(Display)] struct B { a: A, } ``` ``` rust // Not Working struct A; #[derive(Display)] struct B { #[display(fmt...
rustc 1.76.0, derive_more 1.0.0-beta.6 This is a very common use case for derived `Sum` and `Product`: ```rust #[derive(From, Add, Sum, Mul, Product) #[mul(forward)] struct Foo(i32); let x: Vec = vec![1.into(),...
Resolves https://github.com/JelteF/derive_more/issues/342 ## Synopsis We want to support examples like these: ```rust struct StructRecursive { a: i32, b: [i32; 2], c: [[i32; 2]; 3], d: (i32, i32), e: ((u8, [i32;...
Could we make point-wise addition (and multiplication etc) work for structs (and enums etc) that contain arrays as well? ```rust #[derive(Add)] struct MyStruct { x: [T; 32], y: T, }...
Hi, as discussed in https://github.com/nrxus/faux/issues/58 and brought forward by @nrxus, it would be nice if `#[derive(Constructor)]` could support arbitrary attributes. That way, we could use it in conjunction with `faux`....
In the following code, the `Self: 'static` bound gets copied to the derived impl `TryFrom for (&mut Wrapper) where Self: 'static`, which changes the bound from `Foo: 'static` to `&mut...
Resolves #328 Part of #328 ## Synopsis This is an alternative solution to the double reference problem reported in #328. ## Solution Instead of dereferencing macro-generated bindings such as `_0`...
It would be nice to have a derive macro that is similar to `IsVariant` and `Unwrap` but that turns an enum into an `Option` (where `T` is the data of...
My enum: ```rs #[derive(Debug, Clone, PartialEq, IsVariant)] pub enum Value), Dictionary(Dictionary), Date(Date), Float(f64), Integer(Integer), Real(f64), String(&'a str), Uid(Uid), } ``` `cargo expand` shows this:  Which is also what appears...