Skip to main content

ConstructFn

Type Alias ConstructFn 

Source
pub type ConstructFn = fn(&dyn Any) -> Result<Box<dyn ErasedComponent>, ConstructError>;
Expand description

Per-type constructor. Downcasts &dyn Any&Config and calls T::new. Install looks it up by TYPE_NAME.