1use crate::dto::prelude::*;
2
3#[derive(CandidType, Clone, Debug, Deserialize)]
8pub struct MemoryLedgerResponse {
9 pub magic: u64,
10 pub format_id: u32,
11 pub schema_version: u32,
12 pub layout_epoch: u32,
13 pub header_len: u32,
14 pub header_checksum: u64,
15 pub current_generation: u64,
16 pub authorities: Vec<MemoryRangeAuthorityEntry>,
17 pub ranges: Vec<MemoryRangeEntry>,
18 pub entries: Vec<MemoryRegistryEntry>,
19}
20
21#[derive(CandidType, Clone, Debug, Deserialize)]
26pub struct MemoryRangeAuthorityEntry {
27 pub owner: String,
28 pub start: u8,
29 pub end: u8,
30 pub purpose: String,
31}
32
33#[derive(CandidType, Clone, Debug, Deserialize)]
38pub struct MemoryRangeEntry {
39 pub owner: String,
40 pub start: u8,
41 pub end: u8,
42}
43
44#[derive(CandidType, Clone, Debug, Deserialize)]
49pub struct MemoryRegistryResponse {
50 pub entries: Vec<MemoryRegistryEntry>,
51}
52
53#[derive(CandidType, Clone, Debug, Deserialize)]
58pub struct MemoryRegistryEntry {
59 pub id: u8,
60 pub crate_name: String,
61 pub label: String,
62 pub stable_key: String,
63 pub schema_version: Option<u32>,
64 pub schema_fingerprint: Option<String>,
65}