Skip to main content

DynCastExtHelper

Trait DynCastExtHelper 

Source
pub trait DynCastExtHelper<T>
where T: ?Sized,
{ type Target; type Source; type Config; // 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.

Source

type Config

The DynCastConfig that is used to preform the conversion.

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

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

Source§

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

Source§

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

Available on crate feature alloc only.
Source§

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

Available on crate feature alloc only.

Implementors§

Source§

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

Available on crate feature alloc only.