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

Function hook

libs/error-stack/tests/test_debug.rs:436–446  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

434
435 #[test]
436 fn hook() {
437 let _guard = prepare(false);
438
439 let report = create_report().attach_opaque(2_u32);
440
441 Report::install_debug_hook::<u32>(|_, context| {
442 context.push_body("unsigned 32bit integer");
443 });
444
445 assert_snapshot!(format!("{report:?}"));
446 }
447
448 #[test]
449 fn hook_context() {

Callers 5

into_boxed_hookFunction · 0.50
callMethod · 0.50
compile_path_columnMethod · 0.50
add_join_statementsMethod · 0.50
ignoreOutgoingForFunction · 0.50

Calls 4

push_bodyMethod · 0.80
prepareFunction · 0.70
create_reportFunction · 0.70
attach_opaqueMethod · 0.45

Tested by

no test coverage detected