How can I specify a function in a struct definition? Something like this:
struct Operation {
params: Vec<String>,
ops: Function<Vec<String>> -> Vec<String>,
}
I know that the syntax Function<Vec<String>> -> Vec<String>
is incorrect, but I am trying to specify that "Operation" has a field called ops
that is a closure that takes a Vec<String>
and returns a Vec<String>
.