Skip to main content

llama_cpp_bindings/context/
save_session_error.rs

1//! Error type for session file save operations.
2
3use std::ffi::NulError;
4use std::path::PathBuf;
5
6/// Failed to save a session file.
7#[derive(Debug, Eq, PartialEq, thiserror::Error)]
8pub enum SaveSessionError {
9    /// llama.cpp failed to save the session file
10    #[error("Failed to save session file")]
11    FailedToSave,
12
13    /// null byte in string
14    #[error("null byte in string {0}")]
15    NullError(#[from] NulError),
16
17    /// failed to convert path to str
18    #[error("failed to convert path {0} to str")]
19    PathToStrError(PathBuf),
20}