Skip to main content

Deserialize

Trait Deserialize 

Source
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§

Source

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

Source§

fn deserialize<R: Read + Unpin>( reader: &mut R, ) -> Result<Self, SerializationError>

Any non-zero byte is true.

Source§

impl Deserialize for f32

Source§

impl Deserialize for f64

Source§

impl Deserialize for i8

Source§

impl Deserialize for i16

Source§

impl Deserialize for i32

Source§

impl Deserialize for i64

Source§

impl Deserialize for i128

Source§

impl Deserialize for u8

Source§

impl Deserialize for u16

Source§

impl Deserialize for u32

Source§

impl Deserialize for u64

Source§

impl Deserialize for u128

Source§

impl Deserialize for String

Source§

impl Deserialize for Uuid

Source§

impl<T: Deserialize> Deserialize for Option<T>

Source§

impl<T: Deserialize> Deserialize for Vec<T>

Implementors§