fn tstruct(
    addr: AccountAddress,
    module_name: &str,
    function_name: &str,
    args: Vec<SignatureToken>,
) -> SignatureToken {
    let id = ModuleId::new(addr, Identifier::new(module_name).unwrap());
    let native_struct =
        dispatch_native_struct(&id, &Identifier::new(function_name).unwrap()).unwrap();
    let idx = native_struct.expected_index;
    // TODO assert kinds match
    assert_eq!(args.len(), native_struct.expected_type_formals.len());
    SignatureToken::Struct(idx, args)
}
/// Helper for finding expected struct handle index
Helper for finding expected struct handle index
Helper for finding expected struct handle index
fn tstruct(
    addr: AccountAddress,
    module_name: &str,
    function_name: &str,
    args: Vec<SignatureToken>,
) -> SignatureToken {
    let id = ModuleId::new(addr, Identifier::new(module_name).unwrap());
    let native_struct =
        dispatch_native_struct(&id, &Identifier::new(function_name).unwrap()).unwrap();
    let idx = native_struct.expected_index;
    // TODO assert kinds match
    assert_eq!(args.len(), native_struct.expected_type_formals.len());
    SignatureToken::Struct(idx, args)
}
fn tstruct ( addr : AccountAddress , module_name : & str , function_name : & str , args : Vec < SignatureToken > , ) -> SignatureToken { let id = ModuleId :: new ( addr , Identifier :: new ( module_name ) . unwrap ( ) ) ; let native_struct = dispatch_native_struct ( & id , & Identifier :: new ( function_name ) . unwrap ( ) ) . unwrap ( ) ; let idx = native_struct . expected_index ; // TODO assert kinds match assert_eq ! ( args len ( ) native_struct expected_type_formals len ( ) ) ; SignatureToken :: Struct ( idx , args ) }
Helper for finding expected struct handle index
Helper for finding expected struct handle index
addr
AccountAddress
module_name
&str
function_name
&str
args
Vec<SignatureToken>