16 lines
309 B
Rust
Raw Normal View History

2022-08-16 16:25:52 +08:00
use crate::core::NodeAttributes;
pub struct NodeData {
pub node_type: String,
pub attributes: NodeAttributes,
}
impl NodeData {
pub fn new(node_type: &str) -> NodeData {
NodeData {
node_type: node_type.into(),
attributes: NodeAttributes::new(),
}
}
}