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)
Expand description
A native protobuf error.
Expand description
The end of stream was reached.
Expand description
An unknown enum type was encountered.
Show fields
Fields of UnknownEnum
name: String
Expand description
The name of the enum.
Expand description
An unknown enum value was encountered.
Show fields
Fields of UnknownEnumValue
value: i32
Expand description
The number of the enum value.
Expand description
An unknown message type was encountered.
Show fields
Fields of UnknownMessage
name: String
Expand description
The name of the message.
Expand description
An unexpected wire type was received.
Show fields
Fields of BadWireType
wire_type: WireType
Expand description
The encountered wire type.
Expand description
A default value that can’t be parsed was received.
Show fields
Fields of BadDefaultValue
default_value: String
Expand description
The default value that couldn’t be parsed.
Expand description
Some user-defined error occurred.
Show fields
Fields of Custom
message: String
Expand description
The user-defined error message.
Trait Implementations
impl Error for Error
[src]
impl Error for Error
[src]fn source(&self) -> Option<&(dyn Error + 'static)>
[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
[src]The lower-level source of this error, if any. Read more
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
fn description(&self) -> &str
1.0.0[src]
fn description(&self) -> &str
1.0.0[src]use the Display impl or to_string()
impl From<ProtobufError> for Error
[src]
impl From<ProtobufError> for Error
[src]fn from(e: ProtobufError) -> Self
[src]
fn from(e: ProtobufError) -> Self
[src]Performs the conversion.
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> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more