Structs§
- Borsh encodes standard
Options with either a 1 or 0 representing theSomeorNone variants. This means anOptionfor example, is alternately encoded as 33 bytes or 1 byte.NullableOptiontype allows creating a fixed-size genericOptiontype that can be used as anOptionwithout requiring extra space to indicate if the value isSomeorNone. In thePubkey` example it is now always 32 bytes making it friendly to getProgramAccount calls and creating fixed-size on-chain accounts.
Traits§
- Used for Borsh types that can have a
Nonevalue.