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

Function optional_none

cel/src/functions.rs:217–222  ·  view source on GitHub ↗
(ftx: &FunctionContext)

Source from the content-addressed store, hash-verified

215}
216
217pub fn optional_none(ftx: &FunctionContext) -> Result<Value> {
218 if ftx.this.is_some() || !ftx.args.is_empty() {
219 return Err(ftx.error("unsupported function"));
220 }
221 Ok(Value::Opaque(Arc::new(OptionalValue::none())))
222}
223
224pub fn optional_of(ftx: &FunctionContext, value: Value) -> Result<Value> {
225 if ftx.this.is_some() {

Callers

nothing calls this directly

Calls 2

OpaqueInterface · 0.85
errorMethod · 0.80

Tested by

no test coverage detected