llama_cpp_bindings/
gguf_context_error.rs1use std::ffi::NulError;
4use std::path::PathBuf;
5
6#[derive(Debug, thiserror::Error)]
8pub enum GgufContextError {
9 #[error("Failed to initialize GGUF context from file: {0}")]
11 InitFailed(PathBuf),
12
13 #[error("Key not found in GGUF context: {key}")]
15 KeyNotFound {
16 key: String,
18 },
19
20 #[error("null byte in string: {0}")]
22 NulError(#[from] NulError),
23
24 #[error("failed to convert path {0} to str")]
26 PathToStrError(PathBuf),
27
28 #[error("GGUF value is not valid UTF-8: {0}")]
30 Utf8Error(#[from] std::str::Utf8Error),
31}