How i can downcast Arc<Any>
to Arc<SomeStruct>
.
Example on playground.
struct Foo {
first: Arc<Any>,
second: Arc<Any>,
}
impl Foo {
fn get_first<T>(&self) -> Arc<T>
{
self.first.clone()
}
}
How i can downcast Arc<Any>
to Arc<SomeStruct>
.
Example on playground.
struct Foo {
first: Arc<Any>,
second: Arc<Any>,
}
impl Foo {
fn get_first<T>(&self) -> Arc<T>
{
self.first.clone()
}
}