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

Function optional_of

cel/src/functions.rs:224–229  ·  view source on GitHub ↗
(ftx: &FunctionContext, value: Value)

Source from the content-addressed store, hash-verified

222}
223
224pub fn optional_of(ftx: &FunctionContext, value: Value) -> Result<Value> {
225 if ftx.this.is_some() {
226 return Err(ftx.error("unsupported function"));
227 }
228 Ok(Value::Opaque(Arc::new(OptionalValue::of(value))))
229}
230
231pub fn optional_of_non_zero_value(ftx: &FunctionContext, value: Value) -> Result<Value> {
232 if ftx.this.is_some() {

Callers

nothing calls this directly

Calls 2

OpaqueInterface · 0.85
errorMethod · 0.80

Tested by

no test coverage detected