Make render functions work with any error #31
Labels
A-templates
Area: templates
C-enhancement
Category: enhancement
D-medium
Difficulty: medium
P-medium
Priority: medium
S-in-development
Status: in development
Milestone
Is your feature request related to a problem? Please describe.
Right now, render functions like those for the build state strategy need to have
String
as the error type. That's not only annoying for any crate with its own errors, it encourages.unwrap()
s where they're not safe (not mentioning any names all the examples!).Describe the solution you'd like
Render functions should accept a
Box<dyn std::error::Error>
as a return type, andErrorCause
should be able to be defined as blaming the server automatically with?
if it's not explicitly specified.Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
This would be a breaking change, and will be released in v0.3.0.
The text was updated successfully, but these errors were encountered: