[−][src]Trait cast_trait_object::DynCastExtHelper
Used to implement DynCastExt
.
Associated Types
type Target
[src]
The wanted trait object that is returned if the cast succeeded.
type Source
[src]
The original trait object that is returned if the cast failed.
type Config
[src]
The DynCastConfig
that is used to preform the conversion.
Required methods
pub fn _dyn_cast(self) -> Result<Self::Target, Self::Source>
[src]
This method is used to cast from one trait object type to another.
Implementations on Foreign Types
impl<'a, T: ?Sized, F: ?Sized> DynCastExtHelper<T> for Box<F> where
T: 'static,
F: 'static + DynCast<<F as GetDynCastConfig<T>>::Config> + GetDynCastConfig<T>,
[src]
T: 'static,
F: 'static + DynCast<<F as GetDynCastConfig<T>>::Config> + GetDynCastConfig<T>,
This is supported on crate feature
alloc
only.type Target = Box<T>
type Source = Box<F>
type Config = <F as GetDynCastConfig<T>>::Config
pub fn _dyn_cast(self) -> Result<Self::Target, Self::Source>
[src]
impl<'a, T: ?Sized, F: ?Sized> DynCastExtHelper<T> for Rc<F> where
T: 'static,
F: 'static + DynCast<<F as GetDynCastConfig<T>>::Config> + GetDynCastConfig<T>,
[src]
T: 'static,
F: 'static + DynCast<<F as GetDynCastConfig<T>>::Config> + GetDynCastConfig<T>,
This is supported on crate feature
alloc
only.type Target = Rc<T>
type Source = Rc<F>
type Config = <F as GetDynCastConfig<T>>::Config
pub fn _dyn_cast(self) -> Result<Self::Target, Self::Source>
[src]
impl<'a, T: ?Sized, F: ?Sized> DynCastExtHelper<T> for Arc<F> where
T: 'static,
F: 'static + DynCast<<F as GetDynCastConfig<T>>::Config> + GetDynCastConfig<T>,
[src]
T: 'static,
F: 'static + DynCast<<F as GetDynCastConfig<T>>::Config> + GetDynCastConfig<T>,
This is supported on crate feature
alloc
only.type Target = Arc<T>
type Source = Arc<F>
type Config = <F as GetDynCastConfig<T>>::Config
pub fn _dyn_cast(self) -> Result<Self::Target, Self::Source>
[src]
Implementors
impl<'a, T: ?Sized, F: ?Sized> DynCastExtHelper<T> for &'a F where
T: 'static,
F: 'static + DynCast<<F as GetDynCastConfig<T>>::Config> + GetDynCastConfig<T>,
[src]
T: 'static,
F: 'static + DynCast<<F as GetDynCastConfig<T>>::Config> + GetDynCastConfig<T>,
type Target = &'a T
type Source = &'a F
type Config = <F as GetDynCastConfig<T>>::Config
pub fn _dyn_cast(self) -> Result<Self::Target, Self::Source>
[src]
impl<'a, T: ?Sized, F: ?Sized> DynCastExtHelper<T> for &'a mut F where
T: 'static,
F: 'static + DynCast<<F as GetDynCastConfig<T>>::Config> + GetDynCastConfig<T>,
[src]
T: 'static,
F: 'static + DynCast<<F as GetDynCastConfig<T>>::Config> + GetDynCastConfig<T>,