pub enum Error {
Show 22 variants
Canceled,
RemoteCopyNotSupported,
UnsupportedUrlScheme(String),
UnsupportedUrl(Url),
InvalidFileUrl(Url),
InvalidPath,
RemoteContentModified,
DirectoryCreationFailed {
path: PathBuf,
error: Error,
},
CreateTempFile {
error: Error,
},
PersistTempFile {
error: Error,
},
LocalDestinationExists(PathBuf),
RemoteDestinationExists(Url),
Server {
status: StatusCode,
message: String,
},
UnexpectedContentRangeStart,
Azure(AzureError),
S3(S3Error),
Google(GoogleError),
Io(Error),
Walk(Error),
Reqwest(Error),
Middleware(Error),
Temp(PersistError),
}Expand description
Represents a copy operation error.
Variants§
Canceled
The operation was canceled.
RemoteCopyNotSupported
Copying between remote locations is not supported.
UnsupportedUrlScheme(String)
A remote URL has an unsupported URL scheme.
UnsupportedUrl(Url)
Unsupported remote URL.
InvalidFileUrl(Url)
Invalid URl with a file scheme.
InvalidPath
The specified path is invalid.
RemoteContentModified
The remote content was modified during a download.
DirectoryCreationFailed
Failed to create a directory.
Fields
CreateTempFile
Failed to create a temporary file.
PersistTempFile
Failed to persist a temporary file.
LocalDestinationExists(PathBuf)
The local destination path already exists.
RemoteDestinationExists(Url)
The remote destination URL already exists.
Server
The server returned an error.
Fields
status: StatusCodeThe response status code.
UnexpectedContentRangeStart
Server responded with an unexpected content-range header.
Azure(AzureError)
An Azure error occurred.
S3(S3Error)
An S3 error occurred.
Google(GoogleError)
A Google Cloud Storage error occurred.
Io(Error)
An I/O error occurred.
Walk(Error)
A directory walking error occurred.
Reqwest(Error)
A reqwest error occurred.
Middleware(Error)
A reqwest middleware error occurred.
Temp(PersistError)
A temp file persist error occurred.
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<AzureError> for Error
impl From<AzureError> for Error
Source§fn from(source: AzureError) -> Self
fn from(source: AzureError) -> Self
Source§impl From<GoogleError> for Error
impl From<GoogleError> for Error
Source§fn from(source: GoogleError) -> Self
fn from(source: GoogleError) -> Self
Source§impl From<PersistError> for Error
impl From<PersistError> for Error
Source§fn from(source: PersistError) -> Self
fn from(source: PersistError) -> 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.