pub enum Error {
Show 36 variants
NotDirectory(PathBuf),
NotFile(PathBuf),
FileExists(PathBuf),
FolderExists(VaultId),
ResponseCode(StatusCode),
ResponseJson(StatusCode, Value),
ContentType(String, String),
NoReturnValue,
OriginNotFound(Origin),
NotBinaryWebsocketMessageType,
RevokeDeviceSelf,
RevokeDeviceSync(Box<Error>),
ForceUpdate(Box<Error>),
InvalidShareUrl,
FileChecksumMismatch(String, String),
TransferCanceled(CancelReason),
RetryOverflow,
RetryCanceled(CancelReason),
SoftConflict {
conflict: MaybeConflict,
local: SyncStatus,
remote: SyncStatus,
},
HardConflict,
ParseInt(ParseIntError),
ToStr(ToStrError),
Io(Error),
Json(Error),
TryFromSlice(TryFromSliceError),
Sdk(Error),
Http(Error),
UrlParse(ParseError),
Utf8(Utf8Error),
Base58Decode(Error),
HttpStatus(InvalidStatusCode),
WebSocket(Error),
Uuid(Error),
Hex(FromHexError),
Protocol(Error),
Migrate(Error),
}
Expand description
Errors generated by the client module.
Variants§
NotDirectory(PathBuf)
Error generated when a path is not a directory.
NotFile(PathBuf)
Error generated when a path is not a file.
FileExists(PathBuf)
Error generated when a file already exists.
FolderExists(VaultId)
Error generated when a folder already exists.
ResponseCode(StatusCode)
Error generated when an unexpected response code is received.
ResponseJson(StatusCode, Value)
Error generated when an unexpected response code is received.
ContentType(String, String)
Error generated when an unexpected content type is returend.
NoReturnValue
Error generated when a return value is expected from a RPC call but the response did not have a result.
OriginNotFound(Origin)
Error generated when a remote origin could not be found.
NotBinaryWebsocketMessageType
Error generated when a websocket message is not binary.
RevokeDeviceSelf
Error generated attempting to revoke the current device.
RevokeDeviceSync(Box<Error>)
Error generated when failing to sync after revoking a device.
ForceUpdate(Box<Error>)
Error generated force update of an account failed.
Error generated trying to parse a device enrollment sharing URL.
FileChecksumMismatch(String, String)
Error generated when a downloaded file checksum does not match the expected checksum.
TransferCanceled(CancelReason)
Error generated when a file transfer is canceled.
The boolean flag indicates whether the cancellation was triggered by the user.
RetryOverflow
Overflow error calculating the retry exponential factor.
RetryCanceled(CancelReason)
Network retry was canceled possibly by the user.
SoftConflict
Error generated when a soft conflict was detected.
A soft conflict may be resolved by searching for a common ancestor commit and merging changes since the common ancestor commit.
Fields
conflict: MaybeConflict
Conflict information.
local: SyncStatus
Local information sent to the remote.
remote: SyncStatus
Remote information in the server reply.
HardConflict
Error generated when a hard conflict was detected.
A hard conflict is triggered after a soft conflict attempted to scan proofs on a remote and was unable to find a common ancestor commit.
ParseInt(ParseIntError)
Error generated parsing to an integer.
ToStr(ToStrError)
Error generated converting a header to a string.
Io(Error)
Error generated by the io module.
Json(Error)
Error generated by the JSON library.
TryFromSlice(TryFromSliceError)
Error generated attempting to convert from a slice.
Sdk(Error)
Error generated by the SDK library.
Http(Error)
Error generated by the HTTP request library.
UrlParse(ParseError)
Error generated attempting to parse a URL.
Utf8(Utf8Error)
Error generated attempting to convert to a UTF-8 string.
Base58Decode(Error)
Error generated decoding a base58 string.
HttpStatus(InvalidStatusCode)
Error generated converting an HTTP status code.
WebSocket(Error)
listen
only.Error generated by the websocket client.
Uuid(Error)
Error generated when converting to a UUID.
Hex(FromHexError)
Error generated when parsing from hex.
Protocol(Error)
Error generated by the wire protocol library.
Migrate(Error)
migrate
only.Error generated by the migrate library.
Implementations§
Source§impl Error
impl Error
Sourcepub fn is_secret_not_found(&self) -> bool
pub fn is_secret_not_found(&self) -> bool
Determine if this error is a secret not found.
Sourcepub fn is_hard_conflict(&self) -> bool
pub fn is_hard_conflict(&self) -> bool
Determine if this error is a hard conflict.
Sourcepub fn cancellation_reason(&self) -> Option<&CancelReason>
pub fn cancellation_reason(&self) -> Option<&CancelReason>
Determine if this is a canceled error and whether the cancellation was triggered by the user.
Trait Implementations§
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<FromHexError> for Error
impl From<FromHexError> for Error
Source§fn from(source: FromHexError) -> Self
fn from(source: FromHexError) -> 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<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Source§impl From<ParseIntError> for Error
impl From<ParseIntError> for Error
Source§fn from(source: ParseIntError) -> Self
fn from(source: ParseIntError) -> 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
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more