[][src]Enum minecraft_protocol::DecodeError

pub enum DecodeError {
    UnknownPacketType {
        type_id: u8,
    },
    StringTooLong {
        length: usize,
        max_length: u16,
    },
    IOError {
        io_error: IoError,
    },
    JsonError {
        json_error: JsonError,
    },
    Utf8Error {
        utf8_error: FromUtf8Error,
    },
    NonBoolValue,
    UuidParseError {
        uuid_parse_error: UuidParseError,
    },
    UnknownEnumType {
        type_id: u8,
    },
    TagDecodeError {
        tag_decode_error: TagDecodeError,
    },
    VarIntTooLong {
        max_bytes: usize,
    },
}

Possible errors while decoding packet.

Variants

UnknownPacketType

Packet was not recognized. Invalid data or wrong protocol version.

Fields of UnknownPacketType

type_id: u8
StringTooLong

String length can't be more than provided value.

Fields of StringTooLong

length: usize

String length.

max_length: u16

Max string length.

IOError

Fields of IOError

io_error: IoError
JsonError

Fields of JsonError

json_error: JsonError
Utf8Error

Byte array was not recognized as valid UTF-8 string.

Fields of Utf8Error

utf8_error: FromUtf8Error
NonBoolValue

Boolean are parsed from byte. Valid byte value are 0 or 1.

UuidParseError

Fields of UuidParseError

uuid_parse_error: UuidParseError
UnknownEnumType

Fields of UnknownEnumType

type_id: u8
TagDecodeError

Fields of TagDecodeError

tag_decode_error: TagDecodeError
VarIntTooLong

Fields of VarIntTooLong

max_bytes: usize

Trait Implementations

impl Debug for DecodeError[src]

impl From<Error> for DecodeError[src]

impl From<Error> for DecodeError[src]

impl From<FromUtf8Error> for DecodeError[src]

impl From<ParseError> for DecodeError[src]

impl From<TagDecodeError> for DecodeError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.