codama-nodes 0.10.0

Node specifications and helpers for the Codama standard
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::{ArgumentValueNode, CamelCaseString, HasName, ResolverValueNode};
use codama_nodes_derive::node_union;

#[node_union]
pub enum InstructionRemainingAccountsValue {
    Argument(ArgumentValueNode),
    Resolver(ResolverValueNode),
}

impl HasName for InstructionRemainingAccountsValue {
    fn name(&self) -> &CamelCaseString {
        match self {
            InstructionRemainingAccountsValue::Argument(node) => node.name(),
            InstructionRemainingAccountsValue::Resolver(node) => node.name(),
        }
    }
}