Function savefile::load_from_mem [−][src]
pub fn load_from_mem<T: WithSchema + Deserialize>(
input: &[u8],
version: u32
) -> Result<T, SavefileError>
Expand description
Deserialize an instance of type T from the given u8 slice .
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.