pub trait DescribableFunction<Types> {
    fn name(&'static self) -> &'static str;
    fn shape() -> DynamicFunctionShape;
    fn make_dynamic(&'static self) -> Box<dyn DynamicFunction>;
}
Expand description

This trait is implemented for function traits in order to:

  • describe their shape during runtime
  • wrap them into a DynamicFunction which is callable with arbitrary data

Adapted from https://jsdw.me/posts/rust-fn-traits/ but using type ids

Required Methods§

Implementors§