shacl_ir/components/
node_kind.rs1use shacl_ast::node_kind::NodeKind;
2use std::fmt::Display;
3
4#[derive(Debug, Clone)]
9pub struct Nodekind {
10 node_kind: NodeKind,
11}
12
13impl Nodekind {
14 pub fn new(node_kind: NodeKind) -> Self {
15 Nodekind { node_kind }
16 }
17
18 pub fn node_kind(&self) -> &NodeKind {
19 &self.node_kind
20 }
21}
22
23impl Display for Nodekind {
24 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
25 write!(f, "NodeKind: {:?}", self.node_kind())
26 }
27}