pub enum CyberdropError {
InvalidUrl(ParseError),
AuthenticationFailed(StatusCode),
RequestFailed(StatusCode),
MissingAuthToken,
MissingToken,
MissingField(&'static str),
AlbumAlreadyExists(String),
AlbumNotFound(u64),
Api(String),
InvalidFileName,
Io(Error),
Http(Error),
}Expand description
Errors returned by this crate.
This type includes HTTP status classification (authentication vs other failures), conversion errors from loosely-typed API responses, and underlying I/O / HTTP client errors.
Notes:
- Network/transport failures (including timeouts) are returned as
CyberdropError::Http. - Many API responses contain optional fields; missing required fields are reported as
CyberdropError::MissingField.
Variants§
InvalidUrl(ParseError)
An invalid URL was provided or returned.
AuthenticationFailed(StatusCode)
The server returned 401 Unauthorized or 403 Forbidden.
RequestFailed(StatusCode)
A request completed but returned a non-success HTTP status (other than 401/403).
MissingAuthToken
An endpoint requiring authentication was called without configuring a token.
MissingToken
The login response did not include a token.
MissingField(&'static str)
A required field was missing in an API response body.
AlbumAlreadyExists(String)
The service indicates an album already exists (as interpreted by this crate).
AlbumNotFound(u64)
Requested album ID was not present in the authenticated user’s album list.
Api(String)
The API returned an error message or an unexpected response shape.
InvalidFileName
The provided file path did not yield a valid UTF-8 file name.
Io(Error)
An underlying I/O operation failed.
Http(Error)
An underlying HTTP client operation failed.
Trait Implementations§
Source§impl Debug for CyberdropError
impl Debug for CyberdropError
Source§impl Display for CyberdropError
impl Display for CyberdropError
Source§impl Error for CyberdropError
impl Error for CyberdropError
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<Error> for CyberdropError
impl From<Error> for CyberdropError
Source§impl From<Error> for CyberdropError
impl From<Error> for CyberdropError
Source§impl From<ParseError> for CyberdropError
impl From<ParseError> for CyberdropError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Auto Trait Implementations§
impl Freeze for CyberdropError
impl !RefUnwindSafe for CyberdropError
impl Send for CyberdropError
impl Sync for CyberdropError
impl Unpin for CyberdropError
impl UnsafeUnpin for CyberdropError
impl !UnwindSafe for CyberdropError
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.