pub type ChatError = ShimError;Expand description
Errors from the chat layer.
An alias for crate::ShimError — every shim-backed
module shares one error type, since they share one status enum and one error
buffer.
Aliased Type§
pub enum ChatError {
Nul(NulError),
InvalidArg,
BadJson(String),
Failed(String),
Init(String),
Utf8(FromUtf8Error),
CorruptResult,
}Variants§
Nul(NulError)
An argument contained an interior NUL byte, so it could not become a
CString. Caught in Rust — truncating at the NUL would silently change
the value.
InvalidArg
A required pointer argument was null, or a value was out of range.
BadJson(String)
Input was not valid JSON.
Failed(String)
llama.cpp threw. The message is what the exception carried.
Init(String)
A constructor returned null.
Utf8(FromUtf8Error)
Output was not valid UTF-8.
CorruptResult
A shim reported an offset outside the buffer it described, which would mean the shim and this crate disagree about the layout.