MCPcopy Create free account
hub / github.com/cel-rust/cel-rust / arg_value_from_context

Function arg_value_from_context

cel/src/magic.rs:258–262  ·  view source on GitHub ↗

Returns the next argument specified by the context's `arg_idx` field as after resolving it. Calling this multiple times will increment the `arg_idx` which will return subsequent arguments every time. Calling this function when there are no more arguments will result in a panic. Since this function is only ever called within the context of a controlled macro that calls it once for each argument, t

(ctx: &mut FunctionContext)

Source from the content-addressed store, hash-verified

256/// function is only ever called within the context of a controlled macro that calls it once
257/// for each argument, this should never happen.
258fn arg_value_from_context(ctx: &mut FunctionContext) -> Result<Value, ExecutionError> {
259 let idx = ctx.arg_idx;
260 ctx.arg_idx += 1;
261 ctx.resolve(Argument(idx))
262}
263
264pub struct WithFunctionContext;
265

Callers 1

from_contextMethod · 0.85

Calls 2

ArgumentClass · 0.85
resolveMethod · 0.45

Tested by

no test coverage detected