downcast_rs

Trait DowncastSync

Source
pub trait DowncastSync: DowncastSend + Sync {
    // Required methods
    fn into_any_sync(self: Box<Self>) -> Box<dyn Any + Send + Sync>;
    fn into_any_arc(self: Arc<Self>) -> Arc<dyn Any + Send + Sync>;
}
Expand description

Extends DowncastSend for Sync traits to support upcasting to Box<dyn Any + Send + Sync> and Arc downcasting.

Required Methods§

Source

fn into_any_sync(self: Box<Self>) -> Box<dyn Any + Send + Sync>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.

Source

fn into_any_arc(self: Arc<Self>) -> Arc<dyn Any + Send + Sync>

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.

Implementors§

Source§

impl<T: Any + Send + Sync> DowncastSync for T