fn verify_module_function_signature(
    module: &CompiledModule,
    idx: FunctionDefinitionIndex,
    check_signature: FnCheckScriptSignature,
) -> VMResult<()> {
    let fdef = module.function_def_at(idx);

    let resolver = &BinaryIndexedView::Module(module);
    let fhandle = module.function_handle_at(fdef.function);
    let parameters = fhandle.parameters;
    let return_ = fhandle.return_;
    verify_main_signature_impl(
        resolver,
        fdef.visibility,
        parameters,
        Some(return_),
        check_signature,
    )
    .map_err(|e| {
        e.at_index(IndexKind::FunctionDefinition, idx.0)
            .finish(Location::Module(module.self_id()))
    })
}
/// This function checks the extra requirements on the signature of the script visible function
/// when it serves as an entry point for script execution
This function checks the extra requirements on the signature of the script visible function
when it serves as an entry point for script execution
This function checks the extra requirements on the signature of the script visible function when it serves as an entry point for script execution
fn verify_module_function_signature(
    module: &CompiledModule,
    idx: FunctionDefinitionIndex,
    check_signature: FnCheckScriptSignature,
) -> VMResult<()> {
    let fdef = module.function_def_at(idx);
    let resolver = &BinaryIndexedView::Module(module);
    let fhandle = module.function_handle_at(fdef.function);
    let parameters = fhandle.parameters;
    let return_ = fhandle.return_;
    verify_main_signature_impl(
        resolver,
        fdef.visibility,
        parameters,
        Some(return_),
        check_signature,
    )
    .map_err(|e| {
        e.at_index(IndexKind::FunctionDefinition, idx.0)
            .finish(Location::Module(module.self_id()))
    })
}
fn verify_module_function_signature ( module : & CompiledModule , idx : FunctionDefinitionIndex , check_signature : FnCheckScriptSignature , ) -> VMResult < ( ) > { let fdef = module . function_def_at ( idx ) ; let resolver = & BinaryIndexedView :: Module ( module ) ; let fhandle = module . function_handle_at ( fdef . function ) ; let parameters = fhandle . parameters ; let return_ = fhandle . return_ ; verify_main_signature_impl ( resolver , fdef . visibility , parameters , Some ( return_ ) , check_signature , ) . map_err ( | e | { e . at_index ( IndexKind :: FunctionDefinition , idx . 0 ) . finish ( Location :: Module ( module . self_id ( ) ) ) } ) }
This function checks the extra requirements on the signature of the script visible function
when it serves as an entry point for script execution
This function checks the extra requirements on the signature of the script visible function when it serves as an entry point for script execution
module
&CompiledModule
idx
FunctionDefinitionIndex
check_signature
FnCheckScriptSignature