pub trait Deserialize: Sized {
// Required method
fn deserialize<R: Read + Unpin>(
reader: &mut R,
) -> Result<Self, SerializationError>;
}Expand description
Types that can be deserialized from a byte stream according to the Minecraft protocol.
Required Methods§
Sourcefn deserialize<R: Read + Unpin>(
reader: &mut R,
) -> Result<Self, SerializationError>
fn deserialize<R: Read + Unpin>( reader: &mut R, ) -> Result<Self, SerializationError>
Decode an instance of Self from reader.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl Deserialize for bool
impl Deserialize for bool
Source§fn deserialize<R: Read + Unpin>(
reader: &mut R,
) -> Result<Self, SerializationError>
fn deserialize<R: Read + Unpin>( reader: &mut R, ) -> Result<Self, SerializationError>
Any non-zero byte is true.