[][src]Enum serde_php::Error

pub enum Error {
    WriteSerialized(Error),
    ReadSerialized(Error),
    UnexpectedEof,
    Unexpected {
        expected: char,
        actual: char,
    },
    ExpectedDigit {
        actual: char,
    },
    Utf8Error(Utf8Error),
    CharConversionFailed(CharTryFromError),
    NotAValidNumber(Box<dyn Error + Send + Sync>),
    InvalidBooleanValue(char),
    UnsupportedArrayKeyType(char),
    InvalidTypeIndicator(char),
    MissingFeature(&'static str),
    IndexMismatch {
        expected: usize,
        actual: usize,
    },
    LengthRequired,
    SerializationFailed(String),
    DeserializationFailed(String),
}

PHP serialization/deserialization error.

Variants

WriteSerialized(Error)

Error writing serializated value: {0}

ReadSerialized(Error)

Error reading serializing value: {0}

UnexpectedEof

Unexpected end of file while reading,

Unexpected

Expected {expected} but got {actual} instead.

Fields of Unexpected

expected: char

Byte expected.

actual: char

Actual byte found.

ExpectedDigit

Expected a digit, but got {actual} instead.

Fields of ExpectedDigit

actual: char

Non-digit found.

Utf8Error(Utf8Error)

Deserialized bytestring is not valid UTF: {0}

CharConversionFailed(CharTryFromError)

Could not convert into char from decimal value: {0}

NotAValidNumber(Box<dyn Error + Send + Sync>)

Not a valid number or incorrect number type: {0}

InvalidBooleanValue(char)

Not a valid value for boolean: {0}

UnsupportedArrayKeyType(char)

Unsupported array key type (must be all strings or all numeric): {0}

InvalidTypeIndicator(char)

Invalid type indicator on value: {0}

MissingFeature(&'static str)

Feature not implemented by serde_php: {0}

IndexMismatch

Array-index mismatch (must be in-order and numeric), expected {expected} but got {actual}

Fields of IndexMismatch

expected: usize

Expected index.

actual: usize

Actual index found.

LengthRequired

Attempted to serialize sequence of unknown length.

PHP requires all collections to be length prefixed. Serializing sequences of unknown length requires writing these to a memory buffer with potentially unbounded space requirements and is thus disabled.

SerializationFailed(String)

PHP Deserialization failed: {0}

DeserializationFailed(String)

PHP Serialization failed: {0}

Trait Implementations

impl Debug for Error[src]

impl Display for Error[src]

impl Error for Error[src]

impl Error for Error[src]

impl Error for Error[src]

Auto Trait Implementations

impl !RefUnwindSafe for Error

impl Send for Error

impl Sync for Error

impl Unpin for Error

impl !UnwindSafe for Error

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> 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.