error[E0599]: the method `as_dyn_error` exists for reference `&String`, but its trait bounds were not satisfied
--> src/error.rs:34:9
|
34 | source: String,
| ^^^^^^ method cannot be called on `&String` due to unsatisfied trait bounds
The Error trait’s source() method is implemented to return whichever field has a #[source] attribute or is named source , if any. This is for identifying the underlying lower level error that caused your error.