deriv_api_schema/
id.rs

1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/trading_servers/receive.json
4
5// Use direct crate names for imports within generated files
6use serde::{Deserialize, Serialize}; 
7
8
9
10
11// Import shared types from the *same* crate
12
13/// Server unique id.
14#[derive(Debug, Clone, Serialize, Deserialize)] // Enums should also derive Serialize/Deserialize
15#[serde(rename_all = "snake_case")]
16pub enum Id {
17    P01Ts01,
18    P01Ts02,
19    P01Ts03,
20    P01Ts04,
21    P02Ts02,
22    P03Ts01,
23    P03Ts02,
24}
25
26// Optional: Derive Default for enums, defaulting to the first variant? Or require explicit handling?
27// For now, DO NOT derive Default for enums automatically. Structs needing them must handle it.
28
29/* // Example: Deriving Default for Enum (use with caution)
30impl Default for Id {
31    fn default() -> Self {
32        // Default to the first variant found
33        Self::P01Ts01
34    }
35}
36*/
37