pub trait EffectError:
StdError
+ TraceRawVcs
+ NonLocalValue
+ Send
+ Sync
+ 'static { }Expand description
The error type that an effect can return. We use dyn std::error::Error (instead of
anyhow::Error or SharedError) to encourage use of structured error types that can
potentially be transformed into Issues.
We can’t require that the returned error implements Issue:
IssueusesFileSystemPathturbo-tasks-fsreturns effect errors that should be transformed intoIssues.- It logically doesn’t make sense to define
Issueinturbo-tasks-fs,Issuecan’t be defined in a base crate either because it would form a circular crate dependency.
So instead, we leave it up to the caller to figure out how to downcast these errors themselves.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".