rootcause_internals/
util.rs

1//! Utility module
2
3/// Helper trait to force turbofish on calls to e.g. `ptr.cast::<U>()`.
4pub(crate) trait CastTo: 'static {
5    /// Target type of the cast. This is always equal to `Self`, but
6    /// can deliberately not be inferred by the compiler.
7    type Target: 'static;
8}
9
10impl<T: 'static> CastTo for T {
11    type Target = T;
12}
13
14/// Marker struct used when type-erasing reports or attachments
15pub(crate) struct Erased;