Options

Options are a special case of enums. It is simply either a 0 for a None option and a 1 plus the value for a Some option.

Examples:

TypeValueEncoded Value
OptionNone0x00
OptionSome(false)0x0100
OptionSome(true)0x0101
Option<vector<u16>>None0x00
Option<vector<u16>>Some([1,65535))0x01020001FFFF