Function
optional_or_optional
(This(this): This<Value>, other: Value)
Source from the content-addressed store, hash-verified
| 250 | } |
| 251 | |
| 252 | pub fn optional_or_optional(This(this): This<Value>, other: Value) -> Result<Value> { |
| 253 | let this_opt: &OptionalValue = (&this).try_into()?; |
| 254 | match this_opt.value() { |
| 255 | Some(_) => Ok(this), |
| 256 | None => { |
| 257 | let _: &OptionalValue = (&other).try_into()?; |
| 258 | Ok(other) |
| 259 | } |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | pub fn optional_or_value(This(this): This<Value>, other: Value) -> Result<Value> { |
| 264 | let this_opt: &OptionalValue = (&this).try_into()?; |
Callers
nothing calls this directly
Tested by
no test coverage detected