pub enum PromptCachePersistenceError {
PromptCache(PromptCacheError),
Io {
action: &'static str,
path: PathBuf,
source: Error,
},
ManifestJson(Error),
MalformedStorage(String),
UnsafeShardPath(String),
MissingShard(PathBuf),
MalformedShard {
path: PathBuf,
reason: String,
},
InvalidPromptCachePath(PathBuf),
PromptCacheExists(PathBuf),
}Expand description
Filesystem, catalog, and publication failures for a reusable prompt cache.
Variants§
PromptCache(PromptCacheError)
Backend-neutral manifest geometry or identity is invalid.
Io
A filesystem operation failed.
Fields
ManifestJson(Error)
A manifest could not be encoded or decoded.
MalformedStorage(String)
Filesystem publication metadata is malformed.
UnsafeShardPath(String)
A shard path could escape the prompt-cache directory.
MissingShard(PathBuf)
A manifest referenced a missing shard.
MalformedShard
A safetensors shard had missing, extra, or corrupt arrays.
InvalidPromptCachePath(PathBuf)
The target path cannot be published atomically.
PromptCacheExists(PathBuf)
The destination exists and explicit replacement was not requested.
Trait Implementations§
Source§impl Debug for PromptCachePersistenceError
impl Debug for PromptCachePersistenceError
Source§impl Error for PromptCachePersistenceError
impl Error for PromptCachePersistenceError
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<PromptCacheError> for PromptCachePersistenceError
impl From<PromptCacheError> for PromptCachePersistenceError
Source§fn from(source: PromptCacheError) -> Self
fn from(source: PromptCacheError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for PromptCachePersistenceError
impl !UnwindSafe for PromptCachePersistenceError
impl Freeze for PromptCachePersistenceError
impl Send for PromptCachePersistenceError
impl Sync for PromptCachePersistenceError
impl Unpin for PromptCachePersistenceError
impl UnsafeUnpin for PromptCachePersistenceError
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