#[non_exhaustive]pub enum FuncError {
Arity {
name: Arc<str>,
expected: usize,
got: usize,
},
Type {
name: Arc<str>,
index: usize,
expected: &'static str,
got: &'static str,
},
Limit {
name: Arc<str>,
kind: LimitKind,
observed: u64,
limit: u64,
},
PathEscape {
name: &'static str,
path: PathBuf,
},
Other {
name: Arc<str>,
message: Arc<str>,
},
}Expand description
Error returned by an HclFunc::call.
FuncError is the call-site shape; the evaluator converts each variant
to an crate::eval::EvalError or a crate::Diagnostic before it
surfaces in Workspace.diagnostics. The variants intentionally mirror
the evaluator-level types so downstream tooling sees the same LimitKind
regardless of whether the breach happened in the walker or inside a
function body.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Arity
Wrong number of arguments. expected is usize::MAX for variadic
minimum-match failures; messages embed the function-specific shape.
Fields
Type
Argument failed its type check. index is 0-based.
Fields
Limit
A function-level limit fired (e.g. result string > max_str_size).
Fields
PathEscape
File function rejected the path because it resolves outside the workspace root.
Other
Anything else. The message is rendered verbatim in diagnostics; it should not embed user-controlled data without escaping.
Trait Implementations§
Source§impl Error for FuncError
impl Error for FuncError
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 FuncError
impl StructuralPartialEq for FuncError
Auto Trait Implementations§
impl Freeze for FuncError
impl RefUnwindSafe for FuncError
impl Send for FuncError
impl Sync for FuncError
impl Unpin for FuncError
impl UnsafeUnpin for FuncError
impl UnwindSafe for FuncError
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.