Crate sewup_derive[][src]

Macros

fn_sig

fn_sig helps you get you function signature

input_from

input_from will help you to get the input data from contract caller, and automatically deserialize input into handler input_from!(contract, the_name_of_the_handler) Besides, you can map the error to your customized error when something wrong happened in input_from!, for example: input_from!(contract, check_input_object, |_| Err("DeserdeError"))

Attribute Macros

ewasm_fn

The macro helps you to build your handler in the contract, and also generate the function signature, you can use fn_sig! macro to get your function signature of the function wrappered with #[ewasm_fn]

ewasm_lib_fn

The macro helps you to build your handler as a lib, which can used in the contract, the function signature well automatically generated as {FUNCTION_NAME}_SIG

ewasm_main

ewasm_main is a macro for the main function of the contract There are three different contract output.

Derive Macros

Key

Key derive help you implement Key trait for the kv feature

Value

Value derive help you implement Value trait for kv feature