Function
optional_of
(ftx: &FunctionContext, value: Value)
Source from the content-addressed store, hash-verified
| 222 | } |
| 223 | |
| 224 | pub 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 | |
| 231 | pub fn optional_of_non_zero_value(ftx: &FunctionContext, value: Value) -> Result<Value> { |
| 232 | if ftx.this.is_some() { |
Callers
nothing calls this directly
Tested by
no test coverage detected