turbopack_core/introspect/
mod.rs1pub mod module;
2pub mod output_asset;
3pub mod source;
4pub mod utils;
5
6use turbo_rcstr::RcStr;
7use turbo_tasks::{FxIndexSet, ResolvedVc, Vc};
8
9#[turbo_tasks::value(transparent)]
10pub struct IntrospectableChildren(
11 #[bincode(with = "turbo_bincode::indexset")]
12 FxIndexSet<(RcStr, ResolvedVc<Box<dyn Introspectable>>)>,
13);
14
15#[turbo_tasks::value_trait]
16pub trait Introspectable {
17 #[turbo_tasks::function]
18 fn ty(self: Vc<Self>) -> Vc<RcStr>;
19 #[turbo_tasks::function]
20 fn title(self: Vc<Self>) -> Vc<RcStr> {
21 Vc::<RcStr>::default()
22 }
23 #[turbo_tasks::function]
24 fn details(self: Vc<Self>) -> Vc<RcStr> {
25 Vc::<RcStr>::default()
26 }
27 #[turbo_tasks::function]
28 fn children(self: Vc<Self>) -> Vc<IntrospectableChildren> {
29 Vc::cell(FxIndexSet::default())
30 }
31}