pub enum RedirectorError {
FileCreationError(Error),
ShortLinkNotFound,
InvalidUrlPath(UrlPathError),
FailedToReadRegistry(Error),
}Expand description
Errors that can occur during redirect operations.
Variants§
FileCreationError(Error)
An I/O error occurred while creating or writing redirect files.
This includes errors like permission denied, disk full, or invalid file paths.
ShortLinkNotFound
The short link has not been generated (should not occur in normal usage).
This error is included for completeness but should not happen since
short links are automatically generated during Redirector::new().
InvalidUrlPath(UrlPathError)
The provided URL path is invalid.
This occurs when the path contains invalid characters like query parameters (?), semicolons (;), or other forbidden characters.
FailedToReadRegistry(Error)
An error occurred while reading or writing the redirect registry.
This occurs when the registry.json file cannot be read, parsed, or written.
Common causes include corrupted JSON, permission issues, or filesystem errors.
Trait Implementations§
Source§impl Debug for RedirectorError
impl Debug for RedirectorError
Source§impl Display for RedirectorError
impl Display for RedirectorError
Source§impl Error for RedirectorError
impl Error for RedirectorError
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()