[][src]Trait intertrait::CastFromSync

pub trait CastFromSync: CastFrom + Sync + Send + 'static {
    fn arc_any(self: Arc<Self>) -> Arc<dyn Any + Sync + Send + 'static>;
}

CastFromSync must be extended by a trait that is Any + Sync + Send + 'static and wants to allow for casting into another trait behind references and smart pointers especially including Arc.

It is used for obtaining a trait object for [Any + Sync + Send + 'static] from an object for its sub-trait, and blanket implemented for all Sized + Sync + Send + 'static types.

Examples

This example is not tested
trait Source: CastFromSync {
    ...
}

Required methods

fn arc_any(self: Arc<Self>) -> Arc<dyn Any + Sync + Send + 'static>

Loading content...

Implementations on Foreign Types

impl CastFromSync for dyn Any + Sync + Send + 'static[src]

Loading content...

Implementors

impl<T: Sized + Sync + Send + 'static> CastFromSync for T[src]

Loading content...