pub enum Error {
Show 29 variants
    EndOfFile,
    Conflict(ConflictError),
    Io(Error),
    TryFromSlice(TryFromSliceError),
    ProtoBufEncode(EncodeError),
    ProtoBufDecode(DecodeError),
    ProtoEnum(UnknownEnumValue),
    Core(Error),
    Backend(Error),
    BackendStorage(StorageError),
    Signer(Error),
    Sync(Error),
    Merkle(Error),
    Time(ComponentRange),
    UrlParse(ParseError),
    Http(Error),
    StatusCode(InvalidStatusCode),
    Json(Error),
    Network(NetworkError),
    Join(JoinError),
    ToStr(ToStrError),
    Request(Error),
    Base58Decode(Error),
    FileChecksumMismatch(String, String),
    TransferCanceled(CancelReason),
    RetryOverflow,
    RetryCanceled(CancelReason),
    NotBinaryWebsocketMessageType,
    WebSocket(Error),
}Expand description
Errors generated by the wire protocol.
Variants§
EndOfFile
Reached EOF decoding a relay packet.
Conflict(ConflictError)
Error generated when a conflict is detected.
Io(Error)
Error generated by the IO module.
TryFromSlice(TryFromSliceError)
Error generated converting from a slice.
ProtoBufEncode(EncodeError)
Error generated by the protobuf library when encoding.
ProtoBufDecode(DecodeError)
Error generated by the protobuf library when decoding.
ProtoEnum(UnknownEnumValue)
Error generated by the protobuf library when converting enums.
Core(Error)
Error generated by the core library.
Backend(Error)
Error generated by the backend library.
BackendStorage(StorageError)
Error generated by the backendcstorage.
Signer(Error)
Error generated by the signer library.
Sync(Error)
Error generated by the sync library.
Merkle(Error)
Error generated by the merkle tree library.
Time(ComponentRange)
Error generated converting time types.
UrlParse(ParseError)
Error generated parsing URLs.
Http(Error)
Error generated by the HTTP library.
StatusCode(InvalidStatusCode)
Error generated by the HTTP library.
Json(Error)
Error generated by the JSON library.
Network(NetworkError)
Error generated by network communication.
Join(JoinError)
Error generated joining a task.
ToStr(ToStrError)
network-client only.Error generated converting a header to a string.
Request(Error)
network-client only.Error generated by the HTTP request library.
Base58Decode(Error)
network-client only.Error generated decoding a base58 string.
FileChecksumMismatch(String, String)
network-client only.Error generated when a downloaded file checksum does not match the expected checksum.
TransferCanceled(CancelReason)
network-client only.Error generated when a file transfer is canceled.
The boolean flag indicates whether the cancellation was triggered by the user.
RetryOverflow
network-client only.Overflow error calculating the retry exponential factor.
RetryCanceled(CancelReason)
network-client only.Network retry was canceled possibly by the user.
NotBinaryWebsocketMessageType
listen only.Error generated when a websocket message is not binary.
WebSocket(Error)
listen only.Error generated by the websocket client.
Implementations§
Source§impl Error
 
impl Error
Sourcepub fn cancellation_reason(&self) -> Option<&CancelReason>
 Available on crate feature network-client only.
pub fn cancellation_reason(&self) -> Option<&CancelReason>
network-client only.Determine if this is a canceled error and whether the cancellation was triggered by the user.
Trait Implementations§
Source§impl AsConflict for Error
 
impl AsConflict for Error
Source§fn is_conflict(&self) -> bool
 
fn is_conflict(&self) -> bool
Source§fn is_hard_conflict(&self) -> bool
 
fn is_hard_conflict(&self) -> bool
Source§fn take_conflict(self) -> Option<ConflictError>
 
fn take_conflict(self) -> Option<ConflictError>
Source§impl Error for Error
 
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
 
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
 
fn description(&self) -> &str
Source§impl From<ComponentRange> for Error
 
impl From<ComponentRange> for Error
Source§fn from(source: ComponentRange) -> Self
 
fn from(source: ComponentRange) -> Self
Source§impl From<ConflictError> for Error
 
impl From<ConflictError> for Error
Source§fn from(source: ConflictError) -> Self
 
fn from(source: ConflictError) -> Self
Source§impl From<DecodeError> for Error
 
impl From<DecodeError> for Error
Source§fn from(source: DecodeError) -> Self
 
fn from(source: DecodeError) -> Self
Source§impl From<EncodeError> for Error
 
impl From<EncodeError> for Error
Source§fn from(source: EncodeError) -> Self
 
fn from(source: EncodeError) -> Self
Source§impl From<InvalidStatusCode> for Error
 
impl From<InvalidStatusCode> for Error
Source§fn from(source: InvalidStatusCode) -> Self
 
fn from(source: InvalidStatusCode) -> Self
Source§impl From<NetworkError> for Error
 
impl From<NetworkError> for Error
Source§fn from(source: NetworkError) -> Self
 
fn from(source: NetworkError) -> Self
Source§impl From<ParseError> for Error
 
impl From<ParseError> for Error
Source§fn from(source: ParseError) -> Self
 
fn from(source: ParseError) -> Self
Source§impl From<StorageError> for Error
 
impl From<StorageError> for Error
Source§fn from(source: StorageError) -> Self
 
fn from(source: StorageError) -> Self
Source§impl From<ToStrError> for Error
 
impl From<ToStrError> for Error
Source§fn from(source: ToStrError) -> Self
 
fn from(source: ToStrError) -> Self
Source§impl From<TryFromSliceError> for Error
 
impl From<TryFromSliceError> for Error
Source§fn from(source: TryFromSliceError) -> Self
 
fn from(source: TryFromSliceError) -> Self
Source§impl From<UnknownEnumValue> for Error
 
impl From<UnknownEnumValue> for Error
Source§fn from(source: UnknownEnumValue) -> Self
 
fn from(source: UnknownEnumValue) -> Self
Auto Trait Implementations§
impl !Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
 
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
    T: ?Sized,
 
impl<T> PolicyExt for Twhere
    T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
    T: Display,
 
impl<T> ToStringFallible for Twhere
    T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
 
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.