Module tensor_toolbox::nullable

source ·

Structs§

  • Borsh encodes standard Options with either a 1 or 0 representing the Some or None variants. This means an Optionfor 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 the Pubkey` example it is now always 32 bytes making it friendly to getProgramAccount calls and creating fixed-size on-chain accounts.

Traits§

  • Used for Brosh types that can have a None value.