llama_cpp_bindings/error/meta_val_error.rs
1use std::ffi::NulError;
2use std::string::FromUtf8Error;
3
4/// Failed fetching metadata value
5#[derive(Debug, Eq, PartialEq, thiserror::Error)]
6pub enum MetaValError {
7 /// The provided string contains an unexpected null-byte
8 #[error("null byte in string {0}")]
9 NullError(#[from] NulError),
10
11 /// The returned data contains invalid UTF8 data
12 #[error("FromUtf8Error {0}")]
13 FromUtf8Error(#[from] FromUtf8Error),
14
15 /// Got negative return value. This happens if the key or index queried does not exist.
16 #[error("Negative return value. Likely due to a missing index or key. Got return value: {0}")]
17 NegativeReturn(i32),
18}