llama_cpp_bindings/context/
load_session_error.rs1use std::ffi::NulError;
4use std::path::PathBuf;
5
6#[derive(Debug, Eq, PartialEq, thiserror::Error)]
8pub enum LoadSessionError {
9 #[error("Failed to load session file")]
11 FailedToLoad,
12
13 #[error("null byte in string {0}")]
15 NullError(#[from] NulError),
16
17 #[error("failed to convert path {0} to str")]
19 PathToStrError(PathBuf),
20
21 #[error("max_length is not large enough to hold {n_out} (was {max_tokens})")]
23 InsufficientMaxLength {
24 n_out: usize,
26 max_tokens: usize,
28 },
29}