Function solana_sdk::deserialize_utils::default_on_eof [−][src]
pub fn default_on_eof<'de, T, D>(d: D) -> Result<T, D::Error> where
D: Deserializer<'de>,
T: Deserialize<'de> + Default,
This helper function enables successful deserialization of versioned structs; new structs may
include additional fields if they impl Default and are added to the end of the struct. Right
now, this function is targeted at bincode
deserialization; the error match may need to be
updated if another package needs to be used in the future.