pub enum ProsaicError {
MissingSlot {
template: String,
slot: String,
},
UnknownTemplate(String),
InvalidPipe {
pipe: String,
reason: String,
},
GrammarError(String),
TemplateParseError {
template: String,
position: usize,
reason: String,
},
FaithfulnessRejection {
precision: f32,
polarity_match: bool,
},
RecursivePartial {
cycle: Vec<String>,
},
}Variants§
MissingSlot
UnknownTemplate(String)
InvalidPipe
GrammarError(String)
TemplateParseError
FaithfulnessRejection
Returned when the faithfulness gate is enabled and the rendered output fails the precision threshold or has a polarity mismatch. The session state is rolled back as if the render had not occurred.
RecursivePartial
Returned by register_partial when registering the partial would
introduce a direct or indirect {>name} cycle. The cycle field
carries the names involved in the offending chain in traversal order,
repeating the entry partial at the tail so the cycle reads
a -> b -> a.
Trait Implementations§
Source§impl Debug for ProsaicError
impl Debug for ProsaicError
Source§impl Display for ProsaicError
impl Display for ProsaicError
Source§impl Error for ProsaicError
impl Error for ProsaicError
1.30.0 · 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 PartialEq for ProsaicError
impl PartialEq for ProsaicError
Source§fn eq(&self, other: &ProsaicError) -> bool
fn eq(&self, other: &ProsaicError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ProsaicError
Auto Trait Implementations§
impl Freeze for ProsaicError
impl RefUnwindSafe for ProsaicError
impl Send for ProsaicError
impl Sync for ProsaicError
impl Unpin for ProsaicError
impl UnsafeUnpin for ProsaicError
impl UnwindSafe for ProsaicError
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