This commit is contained in:
2026-03-24 13:40:33 +00:00
parent a4cc1487c4
commit f994a566d8
6 changed files with 112 additions and 133 deletions
+10 -8
View File
@@ -164,16 +164,18 @@ pub enum ExportKind {
Const,
}
/// An export item description (opaque for BE logic, except name/kind).
/// Canonical export item (FE-owned, BE-agnostic, no string protocols).
///
/// This surface is stable even if display formatting changes.
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Debug, Clone, PartialEq, Eq, Hash, Ord, PartialOrd)]
pub struct ExportItem {
pub name: ItemName,
pub kind: ExportKind,
}
impl ExportItem {
pub fn new(name: ItemName, kind: ExportKind) -> Self { Self { name, kind } }
pub enum ExportItem {
/// A declared canonical type (struct/enum/etc.)
Type { name: ItemName },
/// A declared service owner (method container)
Service { name: ItemName },
/// A function export (free fn or method) identified by canonical key
Function { fn_key: CanonicalFnKey },
}
/// A fully-qualified export reference: project + module + item + kind.