pub enum DataForgeError {
InvalidTarget(String),
UnsupportedTarget(String),
ProviderApi {
provider: &'static str,
status: u16,
body: String,
},
NotFound {
provider: &'static str,
target: String,
},
DownloadFailed {
dataset: String,
file: String,
message: String,
},
OutputNotDirectory(PathBuf),
Io(Error),
Request(Error),
Json(Error),
}Expand description
Errors returned by DataForge.
Variants§
InvalidTarget(String)
The provided target string could not be normalized.
UnsupportedTarget(String)
The requested provider target is not supported by the current operation.
ProviderApi
Provider API returned a non-success status.
Fields
NotFound
Provider did not find the requested dataset or record.
DownloadFailed
Download failed for one dataset file.
Fields
OutputNotDirectory(PathBuf)
Output path exists but is not a directory.
Io(Error)
Filesystem I/O failure.
Request(Error)
HTTP request failure.
Json(Error)
JSON serialization failure.
Trait Implementations§
Source§impl Debug for DataForgeError
impl Debug for DataForgeError
Source§impl Display for DataForgeError
impl Display for DataForgeError
Source§impl Error for DataForgeError
impl Error for DataForgeError
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<Error> for DataForgeError
impl From<Error> for DataForgeError
Source§impl From<Error> for DataForgeError
impl From<Error> for DataForgeError
Auto Trait Implementations§
impl !RefUnwindSafe for DataForgeError
impl !UnwindSafe for DataForgeError
impl Freeze for DataForgeError
impl Send for DataForgeError
impl Sync for DataForgeError
impl Unpin for DataForgeError
impl UnsafeUnpin for DataForgeError
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