nickbabcock/collectd-rust-plugin

Remove failure dependency

nickbabcock opened this issue · 0 comments

While initially promising, failure seems to be too heavy-handed of a requirement to force onto the user. There seems to be some sort of consensus that failure should be used only for applications.

References:

I'm not sure what would be the most appropriate replacement. Potentially adding a trait so that a plugin's errors are Debug + Display. RFC 2504 also proposes changes to the error trait, which may be a more convenient. Though, on the other hand, I can see a use case where if a plugin handles all errors (ie: specialized logging statements) that it would want to return an empty tuple (implements debug but not display) (ideally suited for the never type). Sounds hard to create an API that is one size fits all.