pub trait StackProgram<N: Network> {
// Required methods
fn program(&self) -> &Program<N>;
fn program_id(&self) -> &ProgramID<N>;
fn contains_external_record(&self, locator: &Locator<N>) -> bool;
fn get_external_stack(
&self,
program_id: &ProgramID<N>
) -> Result<&Arc<Self>>;
fn get_external_program(
&self,
program_id: &ProgramID<N>
) -> Result<&Program<N>>;
fn get_external_record(
&self,
locator: &Locator<N>
) -> Result<&RecordType<N>>;
fn get_function(&self, function_name: &Identifier<N>) -> Result<Function<N>>;
fn get_function_ref(
&self,
function_name: &Identifier<N>
) -> Result<&Function<N>>;
fn get_number_of_calls(
&self,
function_name: &Identifier<N>
) -> Result<usize>;
}
Required Methods§
sourcefn program_id(&self) -> &ProgramID<N>
fn program_id(&self) -> &ProgramID<N>
Returns the program ID.
sourcefn contains_external_record(&self, locator: &Locator<N>) -> bool
fn contains_external_record(&self, locator: &Locator<N>) -> bool
Returns true
if the stack contains the external record.
sourcefn get_external_stack(&self, program_id: &ProgramID<N>) -> Result<&Arc<Self>>
fn get_external_stack(&self, program_id: &ProgramID<N>) -> Result<&Arc<Self>>
Returns the external stack for the given program ID.
sourcefn get_external_program(&self, program_id: &ProgramID<N>) -> Result<&Program<N>>
fn get_external_program(&self, program_id: &ProgramID<N>) -> Result<&Program<N>>
Returns the external program for the given program ID.
sourcefn get_external_record(&self, locator: &Locator<N>) -> Result<&RecordType<N>>
fn get_external_record(&self, locator: &Locator<N>) -> Result<&RecordType<N>>
Returns true
if the stack contains the external record.
sourcefn get_function(&self, function_name: &Identifier<N>) -> Result<Function<N>>
fn get_function(&self, function_name: &Identifier<N>) -> Result<Function<N>>
Returns the function with the given function name.
sourcefn get_function_ref(
&self,
function_name: &Identifier<N>
) -> Result<&Function<N>>
fn get_function_ref( &self, function_name: &Identifier<N> ) -> Result<&Function<N>>
Returns a reference to the function with the given function name.
sourcefn get_number_of_calls(&self, function_name: &Identifier<N>) -> Result<usize>
fn get_number_of_calls(&self, function_name: &Identifier<N>) -> Result<usize>
Returns the expected number of calls for the given function name.
Object Safety§
This trait is not object safe.