[][src]Trait cast_trait_object::GetDynCastConfig

pub trait GetDynCastConfig<T: ?Sized> {
    type Config: DynCastConfig<Target = T, Source = Self>;
}

Get a DynCastConfig type for a source trait that casts to a target trait T.

This is used by the impl_dyn_cast macro to allow specifying only the traits that are being cast from and to instead of a concrete config type that implements the DynCastConfig trait.

This is also needed for the implementation of the DynCastExt trait to ensure that type inference works so that it is ergonomic to use.

Associated Types

type Config: DynCastConfig<Target = T, Source = Self>

A config type that casts from the Self trait to the trait T.

Loading content...

Implementors

Loading content...