pub enum TokenChoiceError<E: Error + 'static> {
Constraint(E),
InvalidToken(u32),
Forbidden(u32),
AlreadyPending,
UnexpectedCommit {
expected: u32,
actual: u32,
},
}Expand description
Rejected canonical choice or error from the original grammar controller.
Variants§
Constraint(E)
The existing grammar/filter failed.
InvalidToken(u32)
ID is outside the canonical vocabulary domain.
Forbidden(u32)
The active grammar/filter disallows this canonical ID.
AlreadyPending
A choice is already waiting for commitment.
UnexpectedCommit
Backend commitment violated the filter it received.
Trait Implementations§
Source§impl<E> Display for TokenChoiceError<E>
impl<E> Display for TokenChoiceError<E>
Source§impl<E> Error for TokenChoiceError<E>
impl<E> Error for TokenChoiceError<E>
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<E> Freeze for TokenChoiceError<E>where
E: Freeze,
impl<E> RefUnwindSafe for TokenChoiceError<E>where
E: RefUnwindSafe,
impl<E> Send for TokenChoiceError<E>where
E: Send,
impl<E> Sync for TokenChoiceError<E>where
E: Sync,
impl<E> Unpin for TokenChoiceError<E>where
E: Unpin,
impl<E> UnsafeUnpin for TokenChoiceError<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for TokenChoiceError<E>where
E: UnwindSafe,
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