Function savefile::load

source ·
pub fn load<T: WithSchema + Deserialize>(
    reader: &mut impl Read,
    version: u32
) -> Result<T, SavefileError>
Expand description

Deserialize an instance of type T from the given reader . The current type of T in memory must be equal to version. The deserializer will use the actual protocol version in the file to do the deserialization.