DynCastExtAdvHelper

Trait DynCastExtAdvHelper 

Source
pub trait DynCastExtAdvHelper<F: ?Sized, T: ?Sized> {
    type Target;
    type Source;

    // Required method
    fn _dyn_cast(self) -> Result<Self::Target, Self::Source>;
}
Expand description

Used to implement DynCastExt.

Required Associated Types§

Source

type Target

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

Source

type Source

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

Required Methods§

Source

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

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

Implementations on Foreign Types§

Source§

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

Source§

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

Source§

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

Available on crate feature alloc only.
Source§

type Target = Box<T>

Source§

type Source = Box<F>

Source§

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

Source§

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

Available on crate feature alloc only.
Source§

type Target = Rc<T>

Source§

type Source = Rc<F>

Source§

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

Source§

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

Available on crate feature alloc only.
Source§

type Target = Arc<T>

Source§

type Source = Arc<F>

Source§

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

Implementors§