pub enum GrammarInitError {
Nul(NulError),
Parse,
}Expand description
Error building a LlamaGrammar.
Variants§
Nul(NulError)
The grammar string or its root symbol contained an interior NUL byte.
Parse
llama_sampler_init_grammar returned null: the GBNF failed to parse.
Trait Implementations§
Source§impl Debug for GrammarInitError
impl Debug for GrammarInitError
Source§impl Display for GrammarInitError
impl Display for GrammarInitError
Source§impl Error for GrammarInitError
impl Error for GrammarInitError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
Auto Trait Implementations§
impl Freeze for GrammarInitError
impl RefUnwindSafe for GrammarInitError
impl Send for GrammarInitError
impl Sync for GrammarInitError
impl Unpin for GrammarInitError
impl UnsafeUnpin for GrammarInitError
impl UnwindSafe for GrammarInitError
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