1 | use std::error::{Error, Request}; |
---|---|
2 | |
3 | #[doc(hidden)] |
4 | pub trait ThiserrorProvide: Sealed { |
5 | fn thiserror_provide<'a>(&'a self, request: &mut Request<'a>); |
6 | } |
7 | |
8 | impl<T> ThiserrorProvide for T |
9 | where |
10 | T: Error + ?Sized, |
11 | { |
12 | #[inline] |
13 | fn thiserror_provide<'a>(&'a self, request: &mut Request<'a>) { |
14 | self.provide(request); |
15 | } |
16 | } |
17 | |
18 | #[doc(hidden)] |
19 | pub trait Sealed {} |
20 | impl<T: Error + ?Sized> Sealed for T {} |
21 |