Enum serde_protobuf::error::Error[][src]

pub enum Error {
    Protobuf(ProtobufError),
    EndOfStream,
    UnknownEnum {
        name: String,
    },
    UnknownEnumValue {
        value: i32,
    },
    UnknownMessage {
        name: String,
    },
    BadWireType {
        wire_type: WireType,
    },
    BadDefaultValue {
        default_value: String,
    },
    Custom {
        message: String,
    },
}
Expand description

An error that may occur when dealing with Protobuf.

Variants

Protobuf(ProtobufError)

Tuple Fields

A native protobuf error.

EndOfStream

The end of stream was reached.

UnknownEnum

Fields

name: String

The name of the enum.

An unknown enum type was encountered.

UnknownEnumValue

Fields

value: i32

The number of the enum value.

An unknown enum value was encountered.

UnknownMessage

Fields

name: String

The name of the message.

An unknown message type was encountered.

BadWireType

Fields

wire_type: WireType

The encountered wire type.

An unexpected wire type was received.

BadDefaultValue

Fields

default_value: String

The default value that couldn’t be parsed.

A default value that can’t be parsed was received.

Custom

Fields

message: String

The user-defined error message.

Some user-defined error occurred.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.