pub enum Errata {
One {
reason: Arc<str>,
},
Two {
reason: Arc<str>,
formula: Arc<str>,
},
Three {
reason: Arc<str>,
formula: Arc<str>,
location: Arc<str>,
},
Critical {
reason: Arc<str>,
formula: Arc<str>,
},
}Expand description
Structured expression and evaluation error metadata.
Variants capture increasing diagnostic detail used by Value::Errata and
Expression::Errata to propagate failures without panics.
Variants§
One
Error with reason only
Two
Error with reason and formula context
Three
Full diagnostic error with reason, formula, and location
Critical
Critical error marker used for HITL / suspension semantics
Implementations§
Source§impl Errata
impl Errata
Sourcepub fn new_reason(reason: Arc<str>) -> Value
pub fn new_reason(reason: Arc<str>) -> Value
Creates a Value::Errata with only a reason.
Sourcepub fn new_reason_formula(reason: Arc<str>, formula: Arc<str>) -> Value
pub fn new_reason_formula(reason: Arc<str>, formula: Arc<str>) -> Value
Creates a Value::Errata with a reason and formula context.
Sourcepub fn new_reason_formula_location(
reason: Arc<str>,
formula: Arc<str>,
location: Arc<str>,
) -> Value
pub fn new_reason_formula_location( reason: Arc<str>, formula: Arc<str>, location: Arc<str>, ) -> Value
Creates a Value::Errata with full diagnostic information (reason, formula, location).
Sourcepub fn new_expression(reason: Arc<str>, expression: Arc<str>) -> Expression
pub fn new_expression(reason: Arc<str>, expression: Arc<str>) -> Expression
Creates an Expression::Errata with a reason and expression context.
Sourcepub fn new_expression_location(
reason: Arc<str>,
expression: Arc<str>,
location: Arc<str>,
) -> Expression
pub fn new_expression_location( reason: Arc<str>, expression: Arc<str>, location: Arc<str>, ) -> Expression
Creates an Expression::Errata with full diagnostic information.
Sourcepub fn formula(&self) -> Arc<str>
pub fn formula(&self) -> Arc<str>
Returns the problematic formula or expression, or an empty string if unavailable.
Sourcepub fn location(&self) -> Arc<str>
pub fn location(&self) -> Arc<str>
Returns the specific error location within the expression, or empty if unavailable.
Sourcepub fn to_formula(&self) -> String
pub fn to_formula(&self) -> String
Return the formula-string representation (round-trippable by the parser).
Trait Implementations§
Source§impl WriterLike for Errata
impl WriterLike for Errata
Source§fn to_stringized(&self) -> String
fn to_stringized(&self) -> String
Source§fn to_sanitized(&self) -> String
fn to_sanitized(&self) -> String
Source§fn to_expressionized(&self) -> String
fn to_expressionized(&self) -> String
impl Eq for Errata
impl StructuralPartialEq for Errata
Auto Trait Implementations§
impl Freeze for Errata
impl RefUnwindSafe for Errata
impl Send for Errata
impl Sync for Errata
impl Unpin for Errata
impl UnwindSafe for Errata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.