pub enum LlamaGrammarFromStrError {
ParseError(GrammarParseError),
LlamaCppNullError,
}
Expand description
An error that can occur creating a grammar from a string.
Variants§
ParseError(GrammarParseError)
There was an error parsing the grammar.
LlamaCppNullError
Llama-cpp returned null - this can occur for many reasons, but should ideally be caught on the rust side beforehand.
Trait Implementations§
source§impl Debug for LlamaGrammarFromStrError
impl Debug for LlamaGrammarFromStrError
source§impl Display for LlamaGrammarFromStrError
impl Display for LlamaGrammarFromStrError
source§impl Error for LlamaGrammarFromStrError
impl Error for LlamaGrammarFromStrError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<GrammarParseError> for LlamaGrammarFromStrError
impl From<GrammarParseError> for LlamaGrammarFromStrError
source§fn from(source: GrammarParseError) -> Self
fn from(source: GrammarParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for LlamaGrammarFromStrError
impl Send for LlamaGrammarFromStrError
impl Sync for LlamaGrammarFromStrError
impl Unpin for LlamaGrammarFromStrError
impl UnwindSafe for LlamaGrammarFromStrError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more