Skip to main content

codama_nodes/generated/value_nodes/
struct_field_value_node.rs

1use crate::{CamelCaseString, HasName, ValueNode};
2use codama_nodes_derive::node;
3
4#[node]
5pub struct StructFieldValueNode {
6    // Data.
7    pub name: CamelCaseString,
8
9    // Children.
10    pub value: Box<ValueNode>,
11}
12
13impl From<StructFieldValueNode> for crate::Node {
14    fn from(val: StructFieldValueNode) -> Self {
15        crate::Node::Value(val.into())
16    }
17}
18
19impl HasName for StructFieldValueNode {
20    fn name(&self) -> &CamelCaseString {
21        &self.name
22    }
23}