pub trait DerivedDynCast<T, C> where
    T: DynCastConfig + Sealed,
    C: DynCastConfig
{ fn derived_dyn_cast_ref(
        &self
    ) -> Result<&<T as DynCastConfig>::Target, &<T as DynCastConfig>::Source>; fn derived_dyn_cast_mut(
        &mut self
    ) -> Result<&mut <T as DynCastConfig>::Target, &mut <T as DynCastConfig>::Source>; fn derived_dyn_cast_boxed(
        self: Box<Self, Global>
    ) -> Result<Box<<T as DynCastConfig>::Target, Global>, Box<<T as DynCastConfig>::Source, Global>>; fn derived_dyn_cast_rc(
        self: Rc<Self>
    ) -> Result<Rc<<T as DynCastConfig>::Target>, Rc<<T as DynCastConfig>::Source>>; fn derived_dyn_cast_arc(
        self: Arc<Self>
    ) -> Result<Arc<<T as DynCastConfig>::Target>, Arc<<T as DynCastConfig>::Source>>; }
Expand description

This is an implementation detail for the macros that implement DynCast.

This trait is a copy of the DynCast trait with the difference that the config type (T) is constrained with a sealed trait so that it must be the ConcreteDynCastConfig type.

There is a blanket implementation so that any type that implements this trait also implements DynCast.

This trait is sometimes implemented by macros instead of the DynCast trait. This allows implementing DynCast for traits that have generic type parameters even if the type parameters aren’t used by the type that DynCast is implemented for.

Required Methods

Cast a shared reference of this trait object to another trait object.

Cast a mutable/unique reference of this trait object to another trait object.

Cast a boxed trait object to another trait object.

Cast a reference counted trait object to another trait object.

Cast an atomically reference counted trait object to another trait object.

Implementors