Module sewup::types[][src]

Expand description

The basic types for storage in low level, and also easiler to used for bytes and string. Sewup using Raw and Row as basic unit to storage the data

  • Raw is the storage unit in the contract, which contains 32 bytes.
  • Row is the list structure of Raw
  • SizedString is a structure to storage String with fixed number of Row

It is easy to convert following types into Raw or Row: str, &str, String, &String, Vec<u8>, [u8], Address, unsigned integer types

Modules

Structs

Address is a 20 bytes binary, you can build a Address with hex string easily.

The storage unit in the contract of Ethereum, which contains 32 bytes The structure is easiler to try_from Row; from Address, bytes, unsigned integers; or into bytes32, bytes20, etc.

A list of Raw, which helps you store much bigger data than a Raw

SizedString is a type help you store string in with a predefined size