pub enum CompileError {
Ebnf(EbnfError),
Schema(SchemaError),
Regex(RegexError),
StructuralTag(StructuralTagError),
Functor(FunctorError),
Lark(LarkError),
TokenIdOutOfRange {
token_id: i32,
vocab_size: i32,
},
}Expand description
An error from converting or compiling a grammar.
Variants§
Ebnf(EbnfError)
The EBNF grammar is invalid.
Schema(SchemaError)
The JSON schema is invalid.
Regex(RegexError)
The regex is invalid.
StructuralTag(StructuralTagError)
The structural tag is invalid.
Functor(FunctorError)
A grammar pass rejected the grammar.
Lark(LarkError)
The Lark grammar is invalid.
TokenIdOutOfRange
A Token(...)/ExcludeToken(...)/TokenTagDispatch id is outside the vocabulary.
Trait Implementations§
Source§impl Clone for CompileError
impl Clone for CompileError
Source§impl Debug for CompileError
impl Debug for CompileError
Source§impl Display for CompileError
impl Display for CompileError
impl Eq for CompileError
Source§impl Error for CompileError
impl Error for CompileError
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()
Source§impl From<EbnfError> for CompileError
impl From<EbnfError> for CompileError
Source§impl From<FunctorError> for CompileError
impl From<FunctorError> for CompileError
Source§fn from(source: FunctorError) -> Self
fn from(source: FunctorError) -> Self
Converts to this type from the input type.
Source§impl From<LarkError> for CompileError
impl From<LarkError> for CompileError
Source§impl From<RegexError> for CompileError
impl From<RegexError> for CompileError
Source§fn from(source: RegexError) -> Self
fn from(source: RegexError) -> Self
Converts to this type from the input type.
Source§impl From<SchemaError> for CompileError
impl From<SchemaError> for CompileError
Source§fn from(source: SchemaError) -> Self
fn from(source: SchemaError) -> Self
Converts to this type from the input type.
Source§impl From<StructuralTagError> for CompileError
impl From<StructuralTagError> for CompileError
Source§fn from(source: StructuralTagError) -> Self
fn from(source: StructuralTagError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CompileError
impl PartialEq for CompileError
impl StructuralPartialEq for CompileError
Auto Trait Implementations§
impl Freeze for CompileError
impl RefUnwindSafe for CompileError
impl Send for CompileError
impl Sync for CompileError
impl Unpin for CompileError
impl UnsafeUnpin for CompileError
impl UnwindSafe for CompileError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more