pub enum Error {
Show 20 variants
Config {
message: String,
key: Option<String>,
},
Database(DatabaseError),
Sqlx(Error),
Nntp(String),
Download(DownloadError),
PostProcess(PostProcessError),
InvalidNzb(String),
Io(Error),
NotFound(String),
ShuttingDown,
Network(Error),
Serialization(Error),
ApiServerError(String),
FolderWatch(String),
Duplicate(String),
InsufficientSpace {
required: u64,
available: u64,
},
DiskSpaceCheckFailed(String),
ExternalTool(String),
NotSupported(String),
Other(String),
}Expand description
Main error type for usenet-dl
This is the primary error type used throughout the library. Each variant includes contextual information to help diagnose issues.
Variants§
Config
Configuration error with context about which setting is invalid
Fields
Database(DatabaseError)
Database operation failed
Sqlx(Error)
SQLx database error
Nntp(String)
NNTP protocol or connection error
Download(DownloadError)
Download-related error
PostProcess(PostProcessError)
Post-processing error (verify, repair, extract, etc.)
InvalidNzb(String)
Invalid NZB file
Io(Error)
I/O error
NotFound(String)
Download not found
ShuttingDown
Shutdown in progress - not accepting new downloads
Network(Error)
Network error
Serialization(Error)
Serialization error
ApiServerError(String)
API server error
FolderWatch(String)
Folder watching error
Duplicate(String)
Duplicate download detected
InsufficientSpace
Insufficient disk space
Fields
DiskSpaceCheckFailed(String)
Failed to check disk space
ExternalTool(String)
External tool execution failed (par2, unrar, etc.)
NotSupported(String)
Operation not supported (missing binary, not implemented, etc.)
Other(String)
Other error
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
use the Display impl or to_string()
Source§impl From<DatabaseError> for Error
impl From<DatabaseError> for Error
Source§fn from(source: DatabaseError) -> Self
fn from(source: DatabaseError) -> Self
Source§impl From<DownloadError> for Error
impl From<DownloadError> for Error
Source§fn from(source: DownloadError) -> Self
fn from(source: DownloadError) -> Self
Source§impl From<PostProcessError> for Error
impl From<PostProcessError> for Error
Source§fn from(source: PostProcessError) -> Self
fn from(source: PostProcessError) -> Self
Source§impl IntoResponse for Error
Implement IntoResponse for Error to automatically convert errors to HTTP responses
impl IntoResponse for Error
Implement IntoResponse for Error to automatically convert errors to HTTP responses
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Source§impl IsRetryable for Error
Implementation of IsRetryable for our Error type
impl IsRetryable for Error
Implementation of IsRetryable for our Error type
Source§fn is_retryable(&self) -> bool
fn is_retryable(&self) -> bool
Source§impl ToHttpStatus for Error
impl ToHttpStatus for Error
Source§fn status_code(&self) -> u16
fn status_code(&self) -> u16
Source§fn error_code(&self) -> &str
fn error_code(&self) -> &str
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin 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