Enum file_protocol::ProtocolError
source · [−]pub enum ProtocolError {
Show 14 variants
CorruptFile(String),
CborError {
err: ProtocolError,
},
FinalizeError {
cause: String,
},
HashMismatch,
InvalidParam(String, String),
MessageCreationError {
message: String,
err: Error,
},
MessageParseError {
err: String,
},
MissingParam(String, String),
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(String, String)
An invalid value was found when parsing a message
MessageCreationError
Fields
message: String
The message which failed creation
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(String, String)
A value was missing when parsing a message
ReceiveError
Fields
err: String
Underlying error encountered
An error was encountered when receiving a message
Serialize
An error was encountered when serializing data
StorageError
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
sourceimpl Debug for ProtocolError
impl Debug for ProtocolError
sourceimpl Display for ProtocolError
impl Display for ProtocolError
sourceimpl Fail for ProtocolError
impl Fail for ProtocolError
sourcefn cause(&self) -> Option<&dyn Fail>
fn cause(&self) -> Option<&dyn Fail>
Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the Backtrace
carried by this failure, if it
carries one. Read more
sourceimpl From<Error> for ProtocolError
impl From<Error> for ProtocolError
sourceimpl From<ProtocolError> for ProtocolError
impl From<ProtocolError> for ProtocolError
sourcefn from(error: ProtocolError) -> Self
fn from(error: ProtocolError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for ProtocolError
impl Send for ProtocolError
impl Sync for ProtocolError
impl Unpin for ProtocolError
impl !UnwindSafe for ProtocolError
Blanket Implementations
impl<T> AsFail for T where
T: Fail,
impl<T> AsFail for T where
T: Fail,
fn as_fail(&self) -> &(dyn Fail + 'static)
fn as_fail(&self) -> &(dyn Fail + 'static)
Converts a reference to Self
into a dynamic trait object of Fail
.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more