Module tensor_toolbox::nullable
source · Structs§
- Borsh encodes standard
Option
s with either a 1 or 0 representing theSome
orNone variants. This means an
Optionfor example, is alternately encoded as 33 bytes or 1 byte.
NullableOptiontype allows creating a fixed-size generic
Optiontype that can be used as an
Optionwithout requiring extra space to indicate if the value is
Someor
None. 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.