Function switchboard_solana::program_id::borsh0_9::get_instance_packed_len
pub fn get_instance_packed_len<T>(instance: &T) -> Result<usize, Error>where
T: BorshSerialize,
👎Deprecated since 1.17.0: Please upgrade to Borsh 1.X and use
borsh1::get_instance_packed_len
insteadExpand description
Get the packed length for the serialized form of this object instance.
Useful when working with instances of types that contain a variable-length sequence, such as a Vec or HashMap. Since it is impossible to know the packed length only from the type’s schema, this can be used when an instance already exists, to figure out how much space to allocate in an account.