Hello.
I am trying to store a Rust function inside my Built-In Function type. However, it complains that the lifetime bound for the object type cannot be deduced from context. (Here: &dyn Fn(HashMap<String, String>, context::Context) -> Type
)
pub enum Value {
NullType,
IntType(i128),
FloatType(f64),
StrType(String),
BoolType(bool),
ArrayType(Vec<Type>, String),
FuncType(HashMap<i32, (tokens::Token, String)>, String, Vec<nodes::Node>),
BuiltInFunctionType(String, HashMap<i32, (String, String)>, &dyn Fn(HashMap<String, String>, context::Context) -> Type)
}
What can I do to fix this? If I can't please let me know of a good workaround.