pub type CastFunction = fn(instance: ComponentInstanceAnyPtr) -> Result<Box<dyn Any>, ComponentInstanceAnyPtr>;
Expand description
(Usually generated) cast function which consumes given type-erased instance pointer and casts it
to the desired ComponentInstancePtr<T>
. The result is then returned as type-erased Box
which
is then converted back to ComponentInstancePtr<T>
. Such shenanigans are needed to be able to
convert between two dyn Traits
.