pub fn from_bytes<'b, T>(s: &'b [u8]) -> Result<T>where
T: Deserialize<'b>,
Expand description
Decode a serializable type from an OpenTTD buffer. The input should be the
data buffer, without the preceding length and packet type. Usually this is
is used to implement PacketRead
.