I have a project where ideally I would like every object to have a Debug implementation. The problem is, I'm using objects that store references/boxes for generic noise functions, and I can't use #[derive(Debug)] because many of these noise structs simply don't implement Debug. My current workaround is to simply use a custom debug impl using derivative to skip those fields, but it's quite annoying and I'd prefer not to need to.
Here are the structs that don't implement it (I think I got them all):
Add
Abs
Blend
Clamp
Constant
Curve
Displace
Exponent
Max
Min
Multiply
Negate
Power
RotatePoint
ScaleBias
ScalePoint
Select
Terrace
TranslatePoint
Worley
I'd like to propose adding a #[derive(Debug)] attribute to all the implementors of NoiseFn. Ideally we would also add it as a base trait requirement to NoiseFn : Debug, but I'm aware that might be a breaking change for downstream implementors of the crate (so maybe behind a feature flag?).
If you agree, I'd be glad to make a fork and PR for this.
I have a project where ideally I would like every object to have a
Debug
implementation. The problem is, I'm using objects that store references/boxes for generic noise functions, and I can't use#[derive(Debug)]
because many of these noise structs simply don't implementDebug
. My current workaround is to simply use a custom debug impl usingderivative
to skip those fields, but it's quite annoying and I'd prefer not to need to.Here are the structs that don't implement it (I think I got them all):
Add
Abs
Blend
Clamp
Constant
Curve
Displace
Exponent
Max
Min
Multiply
Negate
Power
RotatePoint
ScaleBias
ScalePoint
Select
Terrace
TranslatePoint
Worley
I'd like to propose adding a
#[derive(Debug)]
attribute to all the implementors ofNoiseFn
. Ideally we would also add it as a base trait requirement toNoiseFn : Debug
, but I'm aware that might be a breaking change for downstream implementors of the crate (so maybe behind a feature flag?).If you agree, I'd be glad to make a fork and PR for this.