hypercall_db/types/
snapshots.rs1use std::collections::HashMap;
6
7#[derive(Debug, Clone)]
9pub struct InstrumentSnapshotEntry {
10 pub symbol: String,
11 pub data: Vec<u8>,
12}
13
14#[derive(Debug, Clone)]
16pub struct PortfolioSnapshotAccountEntry {
17 pub wallet: String,
18 pub data: Vec<u8>,
19}
20
21#[derive(Debug, Clone)]
23pub struct SnapshotOffsetEntry {
24 pub stream: String,
25 pub partition: i32,
26 pub offset: i64,
27}
28
29#[derive(Debug, Clone)]
31pub struct InstrumentsSnapshotInput {
32 pub snapshot_type: String,
33 pub entries: Vec<InstrumentSnapshotEntry>,
34 pub offsets: HashMap<String, HashMap<i32, i64>>,
35 pub retention_count: i64,
36}
37
38#[derive(Debug, Clone)]
40pub struct PortfolioSnapshotInput {
41 pub accounts: Vec<PortfolioSnapshotAccountEntry>,
42 pub offsets: HashMap<String, HashMap<i32, i64>>,
43 pub retention_count: i64,
44}
45
46#[derive(Debug, Clone)]
48pub struct InstrumentsSnapshotData {
49 pub entries: Vec<InstrumentSnapshotEntry>,
50 pub offsets: Vec<SnapshotOffsetEntry>,
51}
52
53#[derive(Debug, Clone)]
55pub struct PortfolioSnapshotData {
56 pub accounts: Vec<PortfolioSnapshotAccountEntry>,
57 pub offsets: Vec<SnapshotOffsetEntry>,
58}