photon_api/models/node.rs
1/*
2 * photon-indexer
3 *
4 * Solana indexer for general compression
5 *
6 * The version of the OpenAPI document: 0.50.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// A tree node with its encoded index and hash
12#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
13#[serde(rename_all = "camelCase")]
14pub struct Node {
15 /// Encoded node index: (level << 56) | position
16 pub index: u64,
17 pub hash: String,
18}
19
20impl Node {
21 pub fn new(index: u64, hash: String) -> Node {
22 Node { index, hash }
23 }
24}