Skip to main content

llama_cpp_bindings/context/
save_seq_state_error.rs

1//! Error type for sequence state file save operations.
2
3use std::ffi::NulError;
4use std::path::PathBuf;
5
6/// Failed to save a sequence state file.
7#[derive(Debug, Eq, PartialEq, thiserror::Error)]
8pub enum SaveSeqStateError {
9    /// llama.cpp failed to save the sequence state file
10    #[error("Failed to save sequence state 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}