Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for deriving Default #316

Open
GnomedDev opened this issue Nov 17, 2023 · 4 comments
Open

Add support for deriving Default #316

GnomedDev opened this issue Nov 17, 2023 · 4 comments

Comments

@GnomedDev
Copy link

I would love to migrate some libraries from the unmaintained derivative to this crate, but it is missing deriving Default with custom values. If the "custom bound" functionality from https://mcarton.github.io/rust-derivative/latest/Default.html could be implemented that would be fabulous.

@JelteF
Copy link
Owner

JelteF commented Nov 17, 2023

Sounds like a good derive to also support in derive_more. Feel free to contribute a PR for it.

@JelteF
Copy link
Owner

JelteF commented Nov 17, 2023

Regarding custom bounds: so far we've been able to avoid supporting that for other derives by actually generating the correct bounds. If that's possible here too that would be great.

@JelteF
Copy link
Owner

JelteF commented Dec 18, 2023

This is very similar to #311 btw, only for different traits.

@ModProg
Copy link
Contributor

ModProg commented Dec 21, 2023

https://lib.rs/crates/smart-default could be inspiration for the api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants