Function
optional_value
(This(this): This<Value>)
Source from the content-addressed store, hash-verified
| 239 | } |
| 240 | } |
| 241 | pub fn optional_value(This(this): This<Value>) -> Result<Value> { |
| 242 | <&OptionalValue>::try_from(&this)? |
| 243 | .value() |
| 244 | .cloned() |
| 245 | .ok_or_else(|| ExecutionError::function_error("value", "optional.none() dereference")) |
| 246 | } |
| 247 | |
| 248 | pub fn optional_has_value(This(this): This<Value>) -> Result<bool> { |
| 249 | Ok(<&OptionalValue>::try_from(&this)?.value().is_some()) |
Callers
nothing calls this directly
Tested by
no test coverage detected