Trait otter_api_tests::imports::cast_trait_object::DynCastExtAdvHelper [−]
pub trait DynCastExtAdvHelper<F, T> where
T: ?Sized,
F: ?Sized, { type Target; type Source; pub 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.
Required methods
pub 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
impl<'a, T, F, A> DynCastExtAdvHelper<F, T> for Rc<A> where
T: 'static + ?Sized,
A: 'static + DynCast<<F as GetDynCastConfig<T>>::Config> + ?Sized,
F: 'static + GetDynCastConfig<T> + ?Sized,
T: 'static + ?Sized,
A: 'static + DynCast<<F as GetDynCastConfig<T>>::Config> + ?Sized,
F: 'static + GetDynCastConfig<T> + ?Sized,
type Target = Rc<T>
type Source = Rc<F>
pub fn _dyn_cast(
self
) -> Result<<Rc<A> as DynCastExtAdvHelper<F, T>>::Target, <Rc<A> as DynCastExtAdvHelper<F, T>>::Source>
self
) -> Result<<Rc<A> as DynCastExtAdvHelper<F, T>>::Target, <Rc<A> as DynCastExtAdvHelper<F, T>>::Source>
impl<'a, T, F, A> DynCastExtAdvHelper<F, T> for &'a A where
T: 'static + ?Sized,
A: 'static + DynCast<<F as GetDynCastConfig<T>>::Config> + ?Sized,
F: 'static + GetDynCastConfig<T> + ?Sized,
T: 'static + ?Sized,
A: 'static + DynCast<<F as GetDynCastConfig<T>>::Config> + ?Sized,
F: 'static + GetDynCastConfig<T> + ?Sized,
type Target = &'a T
type Source = &'a F
pub fn _dyn_cast(
self
) -> Result<<&'a A as DynCastExtAdvHelper<F, T>>::Target, <&'a A as DynCastExtAdvHelper<F, T>>::Source>
self
) -> Result<<&'a A as DynCastExtAdvHelper<F, T>>::Target, <&'a A as DynCastExtAdvHelper<F, T>>::Source>
impl<'a, T, F, A> DynCastExtAdvHelper<F, T> for Box<A, Global> where
T: 'static + ?Sized,
A: 'static + DynCast<<F as GetDynCastConfig<T>>::Config> + ?Sized,
F: 'static + GetDynCastConfig<T> + ?Sized,
T: 'static + ?Sized,
A: 'static + DynCast<<F as GetDynCastConfig<T>>::Config> + ?Sized,
F: 'static + GetDynCastConfig<T> + ?Sized,
type Target = Box<T, Global>
type Source = Box<F, Global>
pub fn _dyn_cast(
self
) -> Result<<Box<A, Global> as DynCastExtAdvHelper<F, T>>::Target, <Box<A, Global> as DynCastExtAdvHelper<F, T>>::Source>
self
) -> Result<<Box<A, Global> as DynCastExtAdvHelper<F, T>>::Target, <Box<A, Global> as DynCastExtAdvHelper<F, T>>::Source>
impl<'a, T, F, A> DynCastExtAdvHelper<F, T> for &'a mut A where
T: 'static + ?Sized,
A: 'static + DynCast<<F as GetDynCastConfig<T>>::Config> + ?Sized,
F: 'static + GetDynCastConfig<T> + ?Sized,
T: 'static + ?Sized,
A: 'static + DynCast<<F as GetDynCastConfig<T>>::Config> + ?Sized,
F: 'static + GetDynCastConfig<T> + ?Sized,
type Target = &'a mut T
type Source = &'a mut F
pub fn _dyn_cast(
self
) -> Result<<&'a mut A as DynCastExtAdvHelper<F, T>>::Target, <&'a mut A as DynCastExtAdvHelper<F, T>>::Source>
self
) -> Result<<&'a mut A as DynCastExtAdvHelper<F, T>>::Target, <&'a mut A as DynCastExtAdvHelper<F, T>>::Source>
Implementors
impl<'a, T, F, A> DynCastExtAdvHelper<F, T> for Arc<A> where
T: 'static + ?Sized,
A: 'static + DynCast<<F as GetDynCastConfig<T>>::Config> + ?Sized,
F: 'static + GetDynCastConfig<T> + ?Sized,
T: 'static + ?Sized,
A: 'static + DynCast<<F as GetDynCastConfig<T>>::Config> + ?Sized,
F: 'static + GetDynCastConfig<T> + ?Sized,