summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/model/content.rs12
-rw-r--r--src/model/mod.rs2
2 files changed, 8 insertions, 6 deletions
diff --git a/src/model/content.rs b/src/model/content.rs
index 210b8bde..c28082c2 100644
--- a/src/model/content.rs
+++ b/src/model/content.rs
@@ -281,6 +281,12 @@ pub trait Node: 'static {
Content(Arc::new(self), vec![], None)
}
+ /// A unique identifier of the node type.
+ fn id(&self) -> NodeId;
+
+ /// The node's name.
+ fn name(&self) -> &'static str;
+
/// Construct a node from the arguments.
///
/// This is passed only the arguments that remain after execution of the
@@ -300,12 +306,6 @@ pub trait Node: 'static {
/// Access a field on this node.
fn field(&self, name: &str) -> Option<Value>;
- /// A unique identifier of the node type.
- fn id(&self) -> NodeId;
-
- /// The node's name.
- fn name(&self) -> &'static str;
-
/// Extract the pointer of the vtable of the trait object with the
/// given type `id` if this node implements that trait.
fn vtable(&self, id: TypeId) -> Option<*const ()>;
diff --git a/src/model/mod.rs b/src/model/mod.rs
index 20bca106..0f946a40 100644
--- a/src/model/mod.rs
+++ b/src/model/mod.rs
@@ -23,6 +23,8 @@ mod ops;
mod scope;
mod vm;
+#[doc(hidden)]
+pub use once_cell;
pub use typst_macros::{capability, node};
pub use self::args::*;