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§
Sourcefn into_any_sync(self: Box<Self>) -> Box<dyn Any + Send + Sync>
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
.
Sourcefn into_any_arc(self: Arc<Self>) -> Arc<dyn Any + Send + Sync>
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
.