Trait TryAsDynCompatible

pub trait TryAsDynCompatible<'a>: Pointee<Metadata = DynMetadata<Self>>

Trait that is automatically implemented for all dyn Trait<'b, C> + 'a without assoc type bounds. The lifetime parameter should be the same that is used to constrain generic type parameters that are turned into the dyn trait constrained by TryAsDynCompatible.

This is required for try_as_dyn to be able to soundly convert non-static types to dyn Trait.

Note: these requirements are sufficient for soundness, but it is unclear if they are all necessary. We may be able to lift some requirements in favor of more precise ones.