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

Function func

libs/@local/hashql/core/src/module/std_lib/core/mod.rs:20–39  ·  view source on GitHub ↗
(
    lib: &StandardLibrary<'_, 'heap>,
    def: &mut ModuleDef<'heap>,

    name: &'static str,
    alias: &[&'static str],

    r#type: TypeDef<'heap>,
)

Source from the content-addressed store, hash-verified

18pub mod uuid;
19
20pub(in crate::module::std_lib) fn func<'heap>(
21 lib: &StandardLibrary<'_, 'heap>,
22 def: &mut ModuleDef<'heap>,
23
24 name: &'static str,
25 alias: &[&'static str],
26
27 r#type: TypeDef<'heap>,
28) {
29 let value = IntrinsicValueItem { name, r#type };
30
31 let ident = name.rsplit_once("::").expect("path should be non-empty").1;
32
33 def.push_aliased(
34 iter::once(ident)
35 .chain(alias.iter().copied())
36 .map(|name| lib.heap.intern_symbol(name)),
37 ItemDef::intrinsic(value),
38 );
39}
40
41pub(in crate::module::std_lib) struct Core;
42

Callers 15

wait_healthcheckFunction · 0.85
fetchAndParseBlockFunction · 0.85
dropMethod · 0.85
updateMethod · 0.85
defineMethod · 0.85
defineMethod · 0.85
defineMethod · 0.85
defineMethod · 0.85
defineMethod · 0.85
defineMethod · 0.85
defineMethod · 0.85
defineMethod · 0.85

Calls 5

push_aliasedMethod · 0.80
expectMethod · 0.45
mapMethod · 0.45
iterMethod · 0.45
intern_symbolMethod · 0.45

Tested by 2

joinFunction · 0.68
meetFunction · 0.68