pub fn verify_module_function_signature_by_name(
    module: &CompiledModule,
    name: &IdentStr,
    check_signature: FnCheckScriptSignature,
) -> VMResult<()> {
    let fdef_opt = module.function_defs().iter().enumerate().find(|(_, fdef)| {
        module.identifier_at(module.function_handle_at(fdef.function).name) == name
    });
    let (idx, _fdef) = fdef_opt.ok_or_else(|| {
        PartialVMError::new(StatusCode::VERIFICATION_ERROR)
            .with_message("function not found in verify_module_script_function".to_string())
            .finish(Location::Module(module.self_id()))
    })?;
    verify_module_function_signature(
        module,
        FunctionDefinitionIndex(idx as TableIndex),
        check_signature,
    )
}
/// 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
pub fn verify_module_function_signature_by_name(
    module: &CompiledModule,
    name: &IdentStr,
    check_signature: FnCheckScriptSignature,
) -> VMResult<()> {
    let fdef_opt = module.function_defs().iter().enumerate().find(|(_, fdef)| {
        module.identifier_at(module.function_handle_at(fdef.function).name) == name
    });
    let (idx, _fdef) = fdef_opt.ok_or_else(|| {
        PartialVMError::new(StatusCode::VERIFICATION_ERROR)
            .with_message("function not found in verify_module_script_function".to_string())
            .finish(Location::Module(module.self_id()))
    })?;
    verify_module_function_signature(
        module,
        FunctionDefinitionIndex(idx as TableIndex),
        check_signature,
    )
}
pub fn verify_module_function_signature_by_name ( module : & CompiledModule , name : & IdentStr , check_signature : FnCheckScriptSignature , ) -> VMResult < ( ) > { let fdef_opt = module . function_defs ( ) . iter ( ) . enumerate ( ) . find ( | ( _ , fdef ) | { module . identifier_at ( module . function_handle_at ( fdef . function ) . name ) == name } ) ; let ( idx , _fdef ) = fdef_opt . ok_or_else ( | | { PartialVMError :: new ( StatusCode :: VERIFICATION_ERROR ) . with_message ( " " . to_string ( ) ) . finish ( Location :: Module ( module . self_id ( ) ) ) } ) ? ; verify_module_function_signature ( module , FunctionDefinitionIndex ( idx as TableIndex ) , check_signature , ) }
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
name
&IdentStr
check_signature
FnCheckScriptSignature