#[non_exhaustive]pub struct ExprCause {
pub code: ErrorCode,
pub operator: Option<String>,
pub expr_path: Option<String>,
pub steps: Vec<ExprPathStep>,
pub budget: Option<BudgetCause>,
pub ops: Option<u64>,
}Expand description
Structured diagnostic details for an expression compilation, evaluation or budget failure.
Carried on Error::expr_cause and ErrorRecord::cause for host
diagnostics without changing the sanitized wire serialization of Error
or ErrorRecord.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.code: ErrorCodeMachine-stable error code from the expression engine.
operator: Option<String>The operator that raised the error, when known.
expr_path: Option<String>RFC 6901 JSON Pointer to the failing sub-expression in the authored rule, when known.
steps: Vec<ExprPathStep>Structural steps from the root of the compiled expression to the failing node.
budget: Option<BudgetCause>Budget exhaustion details when code is
ErrorCode::BudgetExceeded.
ops: Option<u64>Operations spent by this evaluation before failing, when metered.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ExprCause
impl<'de> Deserialize<'de> for ExprCause
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ExprCause
impl StructuralPartialEq for ExprCause
Auto Trait Implementations§
impl Freeze for ExprCause
impl RefUnwindSafe for ExprCause
impl Send for ExprCause
impl Sync for ExprCause
impl Unpin for ExprCause
impl UnsafeUnpin for ExprCause
impl UnwindSafe for ExprCause
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.