summaryrefslogtreecommitdiff
path: root/src/model/content.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-11-21 13:56:25 +0100
committerLaurenz <laurmaedje@gmail.com>2022-11-21 14:00:37 +0100
commit36ea0b05c9986288eec8bc4a6b35a89b6ea0d3f4 (patch)
tree947f463758adc80e265dbbb24eda21cff4b6e8be /src/model/content.rs
parent7c7b8302251e9703b086c9bf5a989982535bc25b (diff)
Refactor proc macros
Diffstat (limited to 'src/model/content.rs')
-rw-r--r--src/model/content.rs12
1 files changed, 6 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 ()>;