pub fn get_instance_packed_len<T: BorshSerialize>(
instance: &T,
) -> Result<usize, Error>
👎Deprecated since 1.17.0: Please use
v0_10::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.