[][src]Trait cast_trait_object::DynCastExtAdvHelper

pub trait DynCastExtAdvHelper<F: ?Sized, T: ?Sized> {
    type Target;
    type Source;
    fn _dyn_cast(self) -> Result<Self::Target, Self::Source>;
}

Used to implement DynCastExt.

Associated Types

type Target

The wanted trait object that is returned if the cast succeeded.

type Source

The original trait object that is returned if the cast failed.

Loading content...

Required methods

fn _dyn_cast(self) -> Result<Self::Target, Self::Source>

This method is used to cast from one trait object type to another.

Loading content...

Implementations on Foreign Types

impl<'a, T: ?Sized, F: ?Sized, A: ?Sized> DynCastExtAdvHelper<F, T> for Box<A> where
    T: 'static,
    F: 'static + GetDynCastConfig<T>,
    A: 'static + DynCast<<F as GetDynCastConfig<T>>::Config>, 
[src]

type Target = Box<T>

type Source = Box<F>

impl<'a, T: ?Sized, F: ?Sized, A: ?Sized> DynCastExtAdvHelper<F, T> for Rc<A> where
    T: 'static,
    F: 'static + GetDynCastConfig<T>,
    A: 'static + DynCast<<F as GetDynCastConfig<T>>::Config>, 
[src]

type Target = Rc<T>

type Source = Rc<F>

impl<'a, T: ?Sized, F: ?Sized, A: ?Sized> DynCastExtAdvHelper<F, T> for Arc<A> where
    T: 'static,
    F: 'static + GetDynCastConfig<T>,
    A: 'static + DynCast<<F as GetDynCastConfig<T>>::Config>, 
[src]

type Target = Arc<T>

type Source = Arc<F>

Loading content...

Implementors

impl<'a, T: ?Sized, F: ?Sized, A: ?Sized> DynCastExtAdvHelper<F, T> for &'a A where
    T: 'static,
    F: 'static + GetDynCastConfig<T>,
    A: 'static + DynCast<<F as GetDynCastConfig<T>>::Config>, 
[src]

type Target = &'a T

type Source = &'a F

impl<'a, T: ?Sized, F: ?Sized, A: ?Sized> DynCastExtAdvHelper<F, T> for &'a mut A where
    T: 'static,
    F: 'static + GetDynCastConfig<T>,
    A: 'static + DynCast<<F as GetDynCastConfig<T>>::Config>, 
[src]

type Target = &'a mut T

type Source = &'a mut F

Loading content...