Trait downcast::AnySync

source ·
pub trait AnySync: Any + Send + Sync {
    // Required method
    fn into_any_arc(self: Arc<Self>) -> Arc<dyn StdAny + Send + Sync>;
}

Required Methods§

source

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

Implementations§

source§

impl dyn AnySync

source

pub fn is<_T>(&self) -> bool
where _T: Any, Self: Downcast<_T>,

source

pub fn downcast_ref<_T>(&self) -> Result<&_T, TypeMismatch>
where _T: Any, Self: Downcast<_T>,

source

pub fn downcast_mut<_T>(&mut self) -> Result<&mut _T, TypeMismatch>
where _T: Any, Self: Downcast<_T>,

source

pub fn downcast<_T>( self: Box<Self>, ) -> Result<Box<_T>, DowncastError<Box<Self>>>
where _T: Any, Self: Downcast<_T>,

source

pub fn downcast_rc<_T>( self: Rc<Self>, ) -> Result<Rc<_T>, DowncastError<Rc<Self>>>
where _T: Any, Self: Downcast<_T>,

source

pub fn downcast_arc<_T>( self: Arc<Self>, ) -> Result<Arc<_T>, DowncastError<Arc<Self>>>
where _T: AnySync, Self: DowncastSync<_T>,

Trait Implementations§

source§

impl<_T> Downcast<_T> for dyn AnySync
where _T: Any,

source§

impl<_T> DowncastSync<_T> for dyn AnySync
where _T: AnySync,

source§

fn downcast_arc(self: Arc<Self>) -> Result<Arc<T>, DowncastError<Arc<Self>>>

Implementors§

source§

impl<T> AnySync for T
where T: Any + Send + Sync,