[][src]Enum flexbuffers::ReaderError

pub enum ReaderError {
    FlexbufferOutOfBounds,
    InvalidPackedType,
    UnexpectedFlexbufferType {
        expected: FlexBufferType,
        actual: FlexBufferType,
    },
    UnexpectedBitWidth {
        expected: BitWidth,
        actual: BitWidth,
    },
    ReadUsizeOverflowed,
    CannotIndexAsVector,
    IndexOutOfBounds,
    KeyNotFound,
    Utf8Error(Option<Box<Utf8Error>>),
    AlignmentError,
    InvalidRootWidth,
    InvalidMapKeysVectorWidth,
}

All the possible errors when reading a flexbuffer.

Variants

FlexbufferOutOfBounds

One of the following data errors occured:

  • The read flexbuffer had an offset that pointed outside the flexbuffer.
  • The 'negative indicies' where length and map keys are stored were out of bounds
  • The buffer was too small to contain a flexbuffer root.
InvalidPackedType

Failed to parse a valid FlexbufferType and Bitwidth from a type byte.

UnexpectedFlexbufferType

Flexbuffer type of the read data does not match function used.

Fields of UnexpectedFlexbufferType

expected: FlexBufferTypeactual: FlexBufferType
UnexpectedBitWidth

BitWidth type of the read data does not match function used.

Fields of UnexpectedBitWidth

expected: BitWidthactual: BitWidth
ReadUsizeOverflowed

Read a flexbuffer offset or length that overflowed usize.

CannotIndexAsVector

Tried to index a type that's not one of the Flexbuffer vector types.

IndexOutOfBounds

Tried to index a Flexbuffer vector or map out of bounds.

KeyNotFound

A Map was indexed with a key that it did not contain.

Utf8Error(Option<Box<Utf8Error>>)

Failed to parse a Utf8 string. The Option will be None if and only if this Error was deserialized.

AlignmentError

get_slice failed because the given data buffer is misaligned.

InvalidRootWidth
InvalidMapKeysVectorWidth

Trait Implementations

impl Clone for Error[src]

impl Debug for Error[src]

impl<'de> Deserialize<'de> for Error[src]

impl Display for Error[src]

impl Eq for Error[src]

impl Error for Error[src]

impl From<Error> for DeserializationError[src]

impl From<Utf8Error> for Error[src]

impl PartialEq<Error> for Error[src]

impl Serialize for Error[src]

impl StructuralEq for Error[src]

impl StructuralPartialEq for Error[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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.