Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Basically we can consider 3 types of items

1. Scalars 

  • intin SCALE can be encoded as fixed-width integer and compact integer. Compact integer itself has 3 modes. So generally we have 4 ways to serde integer (1 fixed-width + 3 modes of compact integers) 

    {
    "type": "int",
    "mode": "CompactTwoByte"//possible values FixedWidth, CompactSingleByte, CompactTwoByte, CompactFourByte, CompactBigInteger,
    }

  • bool: no tricks here 

    {
    "type": "bool"
    }

2. Built-in containers 

  • Option / Result / Vec / typle / array : basically we are interested in only inner values of the container

3. Custom containers 

  • Structures

...