pub trait StackExecute<N: Network> {
// Required methods
fn execute_closure<A: Aleo<Network = N>>(
&self,
closure: &Closure<N>,
inputs: &[Value<A>],
call_stack: CallStack<N>,
signer: Address<A>,
caller: Address<A>,
tvk: Field<A>,
) -> Result<Vec<Value<A>>>;
fn execute_function<A: Aleo<Network = N>, R: CryptoRng + Rng>(
&self,
call_stack: CallStack<N>,
console_caller: Option<ProgramID<N>>,
root_tvk: Option<Field<N>>,
rng: &mut R,
) -> Result<Response<N>>;
}
Required Methods§
Sourcefn execute_closure<A: Aleo<Network = N>>(
&self,
closure: &Closure<N>,
inputs: &[Value<A>],
call_stack: CallStack<N>,
signer: Address<A>,
caller: Address<A>,
tvk: Field<A>,
) -> Result<Vec<Value<A>>>
fn execute_closure<A: Aleo<Network = N>>( &self, closure: &Closure<N>, inputs: &[Value<A>], call_stack: CallStack<N>, signer: Address<A>, caller: Address<A>, tvk: Field<A>, ) -> Result<Vec<Value<A>>>
Executes a program closure on the given inputs.
§Errors
This method will halt if the given inputs are not the same length as the input statements.
Sourcefn execute_function<A: Aleo<Network = N>, R: CryptoRng + Rng>(
&self,
call_stack: CallStack<N>,
console_caller: Option<ProgramID<N>>,
root_tvk: Option<Field<N>>,
rng: &mut R,
) -> Result<Response<N>>
fn execute_function<A: Aleo<Network = N>, R: CryptoRng + Rng>( &self, call_stack: CallStack<N>, console_caller: Option<ProgramID<N>>, root_tvk: Option<Field<N>>, rng: &mut R, ) -> Result<Response<N>>
Executes a program function on the given inputs.
Note: To execute a transition, do not call this method. Instead, call Process::execute
.
§Errors
This method will halt if the given inputs are not the same length as the input statements.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.