|
@@ -1,5 +1,6 @@
|
|
use ffsend_api::action::delete::Error as DeleteError;
|
|
use ffsend_api::action::delete::Error as DeleteError;
|
|
use ffsend_api::action::download::Error as DownloadError;
|
|
use ffsend_api::action::download::Error as DownloadError;
|
|
|
|
+use ffsend_api::action::exists::Error as ExistsError;
|
|
use ffsend_api::action::params::Error as ParamsError;
|
|
use ffsend_api::action::params::Error as ParamsError;
|
|
use ffsend_api::action::password::Error as PasswordError;
|
|
use ffsend_api::action::password::Error as PasswordError;
|
|
use ffsend_api::action::upload::Error as UploadError;
|
|
use ffsend_api::action::upload::Error as UploadError;
|
|
@@ -36,6 +37,10 @@ pub enum ActionError {
|
|
#[fail(display = "Failed to download the requested file")]
|
|
#[fail(display = "Failed to download the requested file")]
|
|
Download(#[cause] DownloadError),
|
|
Download(#[cause] DownloadError),
|
|
|
|
|
|
|
|
+ /// An error occurred while invoking the exists action.
|
|
|
|
+ #[fail(display = "Failed to check whether the file exists")]
|
|
|
|
+ Exists(#[cause] ExistsError),
|
|
|
|
+
|
|
/// An error occurred while invoking the info action.
|
|
/// An error occurred while invoking the info action.
|
|
#[fail(display = "Failed to fetch file info")]
|
|
#[fail(display = "Failed to fetch file info")]
|
|
Info(#[cause] InfoError),
|
|
Info(#[cause] InfoError),
|
|
@@ -71,6 +76,12 @@ impl From<DownloadError> for ActionError {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+impl From<ExistsError> for ActionError {
|
|
|
|
+ fn from(err: ExistsError) -> ActionError {
|
|
|
|
+ ActionError::Exists(err)
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
impl From<InfoError> for ActionError {
|
|
impl From<InfoError> for ActionError {
|
|
fn from(err: InfoError) -> ActionError {
|
|
fn from(err: InfoError) -> ActionError {
|
|
ActionError::Info(err)
|
|
ActionError::Info(err)
|