#[non_exhaustive]pub enum ThumbnailError {
#[non_exhaustive] InvalidUriIdentity {
reason: &'static str,
},
#[non_exhaustive] InvalidNamespace {
reason: &'static str,
},
#[non_exhaustive] CacheRootUnavailable {
reason: &'static str,
},
#[non_exhaustive] InvalidCacheRoot {
path: PathBuf,
problem: CacheRootProblem,
},
#[non_exhaustive] InvalidCachePath {
path: PathBuf,
problem: CachePathProblem,
},
#[non_exhaustive] InsecureCacheDirectory {
path: PathBuf,
problem: CacheDirectoryProblem,
},
#[non_exhaustive] Io {
context: &'static str,
path: Option<PathBuf>,
source: Error,
},
#[non_exhaustive] Png {
message: String,
},
#[non_exhaustive] InvalidMetadata {
reason: &'static str,
},
#[non_exhaustive] UnsupportedRenderedThumbnail {
reason: &'static str,
},
#[non_exhaustive] ResourceLimitExceeded {
reason: &'static str,
},
#[non_exhaustive] UnsafeRemoval {
reason: &'static str,
},
}Expand description
Errors returned by thumbnail cache identity and filesystem operations.
Reason strings carried by variants are diagnostic text for humans and logs. They are not stable machine-matchable API values; callers should use structured variants and typed validation problems for control flow.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
#[non_exhaustive]InvalidUriIdentity
A URI or filename input is not valid for the requested thumbnail context.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]InvalidNamespace
A cache namespace is not valid for filesystem use.
Fields
This variant is marked as non-exhaustive
The cache root could not be resolved from XDG environment variables.
#[non_exhaustive]InvalidCacheRoot
An explicitly supplied cache root path is invalid.
Fields
This variant is marked as non-exhaustive
problem: CacheRootProblemTyped root problem.
#[non_exhaustive]InvalidCachePath
An explicitly computed cache entry path is invalid.
Fields
This variant is marked as non-exhaustive
problem: CachePathProblemTyped path problem.
#[non_exhaustive]InsecureCacheDirectory
An existing cache directory violates thumbnail cache privacy requirements.
Fields
This variant is marked as non-exhaustive
problem: CacheDirectoryProblemTyped directory problem.
#[non_exhaustive]Io
Filesystem I/O failed.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]Png
PNG data could not be decoded or encoded.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]InvalidMetadata
Thumbnail metadata is invalid.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]UnsupportedRenderedThumbnail
Rendered thumbnail bytes are unsupported.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]ResourceLimitExceeded
PNG parsing or thumbnail normalization would exceed configured resource limits.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]UnsafeRemoval
Cache entry removal was refused by safety checks.
Trait Implementations§
Source§impl Debug for ThumbnailError
impl Debug for ThumbnailError
Source§impl Display for ThumbnailError
impl Display for ThumbnailError
Source§impl Error for ThumbnailError
impl Error for ThumbnailError
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()
Auto Trait Implementations§
impl Freeze for ThumbnailError
impl !RefUnwindSafe for ThumbnailError
impl Send for ThumbnailError
impl Sync for ThumbnailError
impl Unpin for ThumbnailError
impl UnsafeUnpin for ThumbnailError
impl !UnwindSafe for ThumbnailError
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> 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