Closed stephenctw closed 2 months ago
Use anyhow crate (easiest, and it's probably ok), or by generating specific error types with thiserr. Or create an associated type:
anyhow
thiserr
trait T { type Error; async fn foo( &self, ) -> Result<(), Self::Error>; } struct S {} impl T for S { type Error = MyConcreteError; // ... }
Use
anyhow
crate (easiest, and it's probably ok), or by generating specific error types withthiserr
. Or create an associated type: