pub enum Error {
UnexpectedStatusCode(usize),
NotFoundError,
MissingHeader(String),
IoError(Error),
ParsingError(ParseIntError),
UnequalSizeError,
FileReadError,
WrongUploadOffsetError,
FileTooLarge,
HttpHandlerError(String),
}
Expand description
Enumerates the errors which can occur during operation
Variants§
UnexpectedStatusCode(usize)
The status code returned by the server was not one of the expected ones.
NotFoundError
The file specified was not found by the server.
MissingHeader(String)
A required header was missing from the server response.
IoError(Error)
An error occurred while doing disk IO. This may be while reading a file, or during a network call.
ParsingError(ParseIntError)
Unable to parse a value, which should be an integer.
UnequalSizeError
The size of the specified file, and the file size reported by the server do not match.
FileReadError
Unable to read the file specified.
WrongUploadOffsetError
The Client
tried to upload the file with an incorrect offset.
FileTooLarge
The specified file is larger that what is supported by the server.
HttpHandlerError(String)
An error occurred in the HTTP handler.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ParseIntError> for Error
impl From<ParseIntError> for Error
Source§fn from(e: ParseIntError) -> Self
fn from(e: ParseIntError) -> Self
Converts to this type from the input type.
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
Mutably borrows from an owned value. Read more