typst_library/introspection/
mod.rs

1//! Interaction between document parts.
2
3mod counter;
4#[path = "here.rs"]
5mod here_;
6mod introspector;
7#[path = "locate.rs"]
8mod locate_;
9mod location;
10mod locator;
11mod metadata;
12#[path = "query.rs"]
13mod query_;
14mod state;
15mod tag;
16
17pub use self::counter::*;
18pub use self::here_::*;
19pub use self::introspector::*;
20pub use self::locate_::*;
21pub use self::location::*;
22pub use self::locator::*;
23pub use self::metadata::*;
24pub use self::query_::*;
25pub use self::state::*;
26pub use self::tag::*;
27
28use crate::foundations::Scope;
29
30/// Hook up all `introspection` definitions.
31pub fn define(global: &mut Scope) {
32    global.start_category(crate::Category::Introspection);
33    global.define_type::<Location>();
34    global.define_type::<Counter>();
35    global.define_type::<State>();
36    global.define_elem::<MetadataElem>();
37    global.define_func::<here>();
38    global.define_func::<query>();
39    global.define_func::<locate>();
40    global.reset_category();
41}