@@ -5,26 +5,34 @@ use crate::token::LlamaToken;
55use std:: ffi:: { CString , NulError } ;
66use std:: path:: { Path , PathBuf } ;
77
8+ /// Failed to save a Session file
89#[ derive( Debug , Eq , PartialEq , thiserror:: Error ) ]
910pub enum SaveSessionError {
11+ /// llama.cpp failed to save the session file
1012 #[ error( "Failed to save session file" ) ]
1113 FailedToSave ,
1214
15+ /// null byte in string
1316 #[ error( "null byte in string {0}" ) ]
1417 NullError ( #[ from] NulError ) ,
1518
19+ /// failed to convert path to str
1620 #[ error( "failed to convert path {0} to str" ) ]
1721 PathToStrError ( PathBuf ) ,
1822}
1923
24+ /// Failed to load a Session file
2025#[ derive( Debug , Eq , PartialEq , thiserror:: Error ) ]
2126pub enum LoadSessionError {
27+ /// llama.cpp failed to load the session file
2228 #[ error( "Failed to load session file" ) ]
2329 FailedToLoad ,
2430
31+ /// null byte in string
2532 #[ error( "null byte in string {0}" ) ]
2633 NullError ( #[ from] NulError ) ,
2734
35+ /// failed to convert path to str
2836 #[ error( "failed to convert path {0} to str" ) ]
2937 PathToStrError ( PathBuf ) ,
3038}
0 commit comments