The current Snippet trait contains redundant methods.
Merge outputs and output_types so that the return type is Vec<(String, DataType)>
Merge inputs and input_types so that the return type is Vec<(String, DataType)>
Infer stack_diff from the previous.
Update all existing snippets to this new trait interface.
Also, public_input and secret_input are not mutable vectors. As a result, you cannot string together multiple programs, each of which consume a part of public or secret input.
Make public_input and secret_input mutable, in rust_shadowing.
The current
Snippet
trait contains redundant methods.outputs
andoutput_types
so that the return type isVec<(String, DataType)>
inputs
andinput_types
so that the return type isVec<(String, DataType)>
stack_diff
from the previous.Also,
public_input
andsecret_input
are not mutable vectors. As a result, you cannot string together multiple programs, each of which consume a part of public or secret input.public_input
andsecret_input
mutable, inrust_shadowing
.