#[non_exhaustive]pub enum EvalError {
Cycle {
participants: Vec<Address>,
},
Limit {
kind: LimitKind,
observed: u64,
limit: u64,
},
Func {
name: Arc<str>,
message: Arc<str>,
},
PathEscape {
func: &'static str,
path: PathBuf,
},
}Expand description
Recoverable evaluator failure.
EvalError is not propagated out of
crate::eval::Evaluator::evaluate: instead the evaluator records each
failure as a crate::Diagnostic on the returned
crate::eval::EvaluatedComponent and proceeds. The error type is
public so callers (and tests) can build the same diagnostic shape
elsewhere — see HclEvaluator for the
conversion path.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Cycle
A cycle was detected in locals. The participants list is the cycle
in order of first observation (deterministic — sorted by name) so
the diagnostic is stable across runs.
Fields
Limit
A configured limit fired. kind identifies which one; the message
embeds the observed and configured values.
Fields
Func
A registered function returned an error. name is the function
being called; message is the function’s own diagnostic. Function
failures are recoverable: the call site keeps the unresolved
expression and the workspace surfaces a diagnostic.
PathEscape
A sandboxed file function rejected a path because it resolved outside the workspace root.
Trait Implementations§
Source§impl Error for EvalError
impl Error for EvalError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
impl Eq for EvalError
impl StructuralPartialEq for EvalError
Auto Trait Implementations§
impl Freeze for EvalError
impl RefUnwindSafe for EvalError
impl Send for EvalError
impl Sync for EvalError
impl Unpin for EvalError
impl UnsafeUnpin for EvalError
impl UnwindSafe for EvalError
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,
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
key and return true if they are equal.