Trait CastFromSync

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

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

trait Source: CastFromSync {
    ...
}

Required Methods§

Source

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

Implementations on Foreign Types§

Source§

impl CastFromSync for dyn Any + Sync + Send + 'static

Source§

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

Implementors§

Source§

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