Hello, I'm currently working on a project which uses an arena allocator. This setup makes almost all values and errors have 'arena lifetime.
The problem is that every type that goes to source field should have 'static lifetime because of the requirement of the Error trait. This restriction makes it impossible to use Snafu to chain my error types via source field.
If my understanding is correct, Snafu's mechanism for attaching context to hierarchical errors does not necessarily need 'static lifetime. Is there a way to opt-out from automatic implementation of Error trait or make source() always return None, and use non static error types for error chaining?
Hello, I'm currently working on a project which uses an arena allocator. This setup makes almost all values and errors have
'arena
lifetime.The problem is that every type that goes to
source
field should have'static
lifetime because of the requirement of the Error trait. This restriction makes it impossible to use Snafu to chain my error types viasource
field.If my understanding is correct, Snafu's mechanism for attaching context to hierarchical errors does not necessarily need
'static
lifetime. Is there a way to opt-out from automatic implementation ofError
trait or makesource()
always returnNone
, and use non static error types for error chaining?