pub enum ProtocolError {
Show 14 variants CorruptFile(String), CborError { err: ProtocolError, }, FinalizeError { cause: String, }, HashMismatch, InvalidParam(StringString), MessageCreationError { message: String, err: Error, }, MessageParseError { err: String, }, MissingParam(StringString), ReceiveError { err: String, }, Serialize { err: Error, }, StorageError { action: String, err: Error, }, StorageParseError(String), ReceiveTimeout, TransmissionError { channel_id: u32, error_message: String, },
}
Expand description

Errors which occur when using FileProtocol

Variants

CorruptFile(String)

A file in storage was corrupt

CborError

Fields

err: ProtocolError

The specific cbor protocol error

An error was encountered by the cbor protocol

FinalizeError

Fields

cause: String

The cause of the finalizing failure

An error was encountered when finalizing the file

HashMismatch

A hash mismatch was found when finalizing the file

InvalidParam(StringString)

An invalid value was found when parsing a message

MessageCreationError

Fields

message: String

The message which failed creation

err: Error

The underlying serde error encountered

An error was encountered when creating a message

MessageParseError

Fields

err: String

Underlying error encountered

A general error was encountered when parsing a message

MissingParam(StringString)

A value was missing when parsing a message

ReceiveError

Fields

err: String

Underlying error encountered

An error was encountered when receiving a message

Serialize

Fields

err: Error

Underlying serde error

An error was encountered when serializing data

StorageError

Fields

action: String

The action which generated the error

err: Error

The underlying std::io::Error

An error was encountered when writing to or reading from file storage

StorageParseError(String)

An error was encountered when parsing file storage data

ReceiveTimeout

A timeout occurred when receiving data

TransmissionError

Fields

channel_id: u32

Channel where the error occurred

error_message: String

Message from underlying error

An error was encountered when transmitting

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Returns the “name” of the error. Read more

Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more

Returns a reference to the Backtrace carried by this failure, if it carries one. Read more

Provides context for this failure. Read more

Wraps this failure in a compatibility wrapper that implements std::error::Error. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Converts a reference to Self into a dynamic trait object of Fail.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.