Constructs `Opaque(Interval, {end: .., start: ..})`. Field order in `push` calls does not matter; [`StructBuilder::finish`] sorts fields lexicographically.
(
heap: &'heap Heap,
symbols: &InternSet<'heap, [Symbol<'heap>]>,
start: Value<'heap, &'heap Heap>,
end: Value<'heap, &'heap Heap>,
)
| 49 | /// Field order in `push` calls does not matter; [`StructBuilder::finish`] |
| 50 | /// sorts fields lexicographically. |
| 51 | fn interval_value<'heap>( |
| 52 | heap: &'heap Heap, |
| 53 | symbols: &InternSet<'heap, [Symbol<'heap>]>, |
| 54 | start: Value<'heap, &'heap Heap>, |
| 55 | end: Value<'heap, &'heap Heap>, |
| 56 | ) -> Value<'heap, &'heap Heap> { |
| 57 | let mut builder = StructBuilder::<_, 2>::new(); |
| 58 | builder.push(sym::end, end); |
| 59 | builder.push(sym::start, start); |
| 60 | |
| 61 | let inner = builder.finish(symbols, heap); |
| 62 | |
| 63 | Value::Opaque(value::Opaque::new( |
| 64 | sym::path::Interval, |
| 65 | Rc::new_in(Value::Struct(inner), heap), |
| 66 | )) |
| 67 | } |
| 68 | |
| 69 | /// Converts an [`AxisInterval`] to a `Value` representing a temporal |
| 70 | /// interval: `Opaque(Interval, {start: <bound>, end: <bound>})`. |
no test coverage detected