MCPcopy Create free account
hub / github.com/hashintel/hash / define

Method define

libs/@local/hashql/core/src/module/std_lib/graph/tmp.rs:23–43  ·  view source on GitHub ↗
(lib: &mut StandardLibrary<'_, 'heap>)

Source from the content-addressed store, hash-verified

21 }
22
23 fn define(lib: &mut StandardLibrary<'_, 'heap>) -> ModuleDef<'heap> {
24 let mut def = ModuleDef::new();
25
26 let query_temporal_axes_ty = lib
27 .manifest::<std_lib::graph::temporal::Temporal>()
28 .expect_type(sym::QueryTemporalAxes);
29
30 // ::graph::tmp::decision_time_now() -> TimeAxis
31 func(
32 lib,
33 &mut def,
34 "::graph::tmp::decision_time_now",
35 &[],
36 TypeDef {
37 id: lib.ty.closure([] as [TypeId; 0], query_temporal_axes_ty.id),
38 arguments: lib.ty.env.intern_generic_argument_references(&[]),
39 },
40 );
41
42 def
43 }
44}

Callers

nothing calls this directly

Calls 4

funcFunction · 0.85
expect_typeMethod · 0.45
closureMethod · 0.45

Tested by

no test coverage detected